build/meson: Add XRT_HAVE_DBUS when dbus is found

This commit is contained in:
Christoph Haag 2020-10-05 01:07:14 +02:00 committed by Jakob Bornecrantz
parent 5ca90343ab
commit 5bea856f20
4 changed files with 30 additions and 7 deletions

View file

@ -69,6 +69,7 @@ libuvc = dependency('libuvc', required: false)
vulkan = dependency('vulkan', required: true)
zlib = dependency('zlib', required: false)
survive = dependency('survive', required: false)
dbus = dependency('dbus-1', required: get_option('dbus'))
opencv = dependency('opencv4', required: false)
if not opencv.found()

View file

@ -67,6 +67,11 @@ option('wayland',
value: 'auto',
description: 'Enable support for Wayland rendering.')
option('dbus',
type: 'feature',
value: 'auto',
description: 'Enable support for dbus.')
option('service',
type: 'boolean',
value: true,

View file

@ -91,15 +91,28 @@ if build_opengl or build_opengles
)
endif
lib_aux_os = static_library(
'aux_os',
files(
aux_os_files = files(
'os/os_documentation.h',
'os/os_hid.h',
'os/os_hid_hidraw.c',
'os/os_threading.h',
'os/os_time.h',
),
'os/os_ble.h',
)
aux_os_deps = []
if dbus.found() and not get_option('dbus').disabled()
aux_os_files += files(
'os/os_ble_dbus.c'
)
aux_os_deps += dbus
endif
lib_aux_os = static_library(
'aux_os',
aux_os_files,
dependencies: aux_os_deps,
include_directories: xrt_include,
)

View file

@ -73,6 +73,10 @@ if true
have_conf.set('XRT_HAVE_VULKAN', true)
endif
if dbus.found() and not get_option('dbus').disabled()
have_conf.set('XRT_HAVE_DBUS', true)
endif
if get_option('layer_depth')
have_conf.set('XRT_FEATURE_OPENXR_LAYER_DEPTH', true)
endif