File: build-hello-xr-opengl-xlib

package info (click to toggle)
openxr-sdk-source 1.0.14~dfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 6,564 kB
  • sloc: python: 16,103; cpp: 12,052; ansic: 8,813; xml: 3,480; sh: 410; makefile: 338; ruby: 247
file content (31 lines) | stat: -rwxr-xr-x 701 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/sh
# Copyright 2019 Ryan Pavlik
# SPDX-License-Identifier: Apache-2.0

set -e
# set -x

MYDIR=$(mktemp -d)
trap "rm -rf $MYDIR" EXIT

SRC=$(pwd)

cd $MYDIR
FLAGS="-DOS_LINUX_XLIB -I${SRC}/external/include"

# must compile gfxwrapper separately first with cc
cc -std=c99 ${FLAGS} -c ${SRC}/src/common/gfxwrapper_opengl.c -o gfxwrapper.o
c++ \
    -std=c++11 \
    ${FLAGS} \
    -I${SRC}/src \
    -I${SRC}/src/common \
    -I${SRC}/src/tests/hello_xr/vulkan_shaders \
    -DXR_USE_PLATFORM_XLIB \
    -DXR_USE_GRAPHICS_API_OPENGL \
    gfxwrapper.o \
    ${SRC}/src/tests/hello_xr/*.cpp \
    $(pkg-config --cflags --libs openxr gl x11 xxf86vm xrandr) \
    -o hello_xr

# ./hello_xr -g OpenGL