This repository has been archived by the owner on Sep 18, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathmeson.build
54 lines (45 loc) · 1.96 KB
/
meson.build
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
project('stardustxr', 'cpp', default_options: ['cpp_std=c++17'], version:'0.9.2')
add_project_arguments([
'-DWLR_USE_UNSTABLE',
# '-Dwlroots:gles2-renderer=enabled',
], language: 'cpp')
cmake = import('cmake')
pkg = import('pkgconfig')
libstardustxr = dependency('stardustxr-server', version:'>=0.9.0', required: true)
flatbuffers = dependency('flatbuffers', version:'>=2.0.6')
stereokit_options = cmake.subproject_options()
stereokit_options.add_cmake_defines({'CMAKE_BUILD_TYPE': get_option('buildtype')})
stereokit_options.add_cmake_defines({'SK_LINUX_EGL': true, 'SK_BUILD_TESTS': false, 'SK_BUILD_SHARED_LIBS': false, 'SK_PHYSICS': false})
stereokit_options.add_cmake_defines({'CMAKE_CXX_FLAGS': '-Wno-unused-variable -Wno-unused-but-set-variable -Wno-unknown-pragmas -Wno-sign-compare -Wno-switch -Wno-parentheses -Wno-sizeof-pointer-memaccess'})
stereokit_options.set_install(false)
stereokit_project = cmake.subproject('StereoKit', options: stereokit_options)
stereokit = stereokit_project.dependency('StereoKitC')
xdg_utils_project = cmake.subproject('xdg-utils')
xdg_utils_basedir = xdg_utils_project.dependency('BaseDir')
wlroots_proj = subproject('wlroots', default_options: ['default_library=static', 'backends=[]', 'renderers=[\'gles2\']', 'examples=false', 'xcb-errors=disabled'])
wlroots = wlroots_proj.get_variable('wlroots')
wlroots_server_protocols = wlroots_proj.get_variable('protocols_server_header')
server_protocols = [
wlroots_server_protocols['xdg-shell']
]
src_includes = include_directories('src')
thirdparty_includes = include_directories('thirdparty')
includes = [src_includes, thirdparty_includes]
src_files = []
subdir('src')
src_files += server_protocols
src_files += files('src/main.cpp')
executable(
'stardustxr',
src_files,
include_directories: includes,
link_args: ['-lX11', '-lGLX', '-lEGL', '-ldl', '-lopenxr_loader', '-lfontconfig'],
dependencies: [
libstardustxr,
flatbuffers,
stereokit,
wlroots,
xdg_utils_basedir,
],
install : true,
)