build/meson: Build daydream and arduino driver when dbus is enabled

This commit is contained in:
Christoph Haag 2020-10-05 01:07:53 +02:00 committed by Jakob Bornecrantz
parent 5bea856f20
commit dc29c3f97e
4 changed files with 48 additions and 1 deletions

View file

@ -191,6 +191,16 @@ if survive.found() and ('survive' in drivers)
endif
endif
if not get_option('dbus').disabled() and dbus.found()
if 'daydream' not in drivers
drivers += ['daydream']
endif
if 'arduino' not in drivers
drivers += ['arduino']
endif
endif
if drivers.length() == 0 or drivers == ['auto']
error('You must enable at least one driver.')
endif

View file

@ -3,7 +3,7 @@
option('drivers',
type: 'array',
choices: ['auto', 'dummy', 'hdk', 'hydra', 'ns', 'ohmd', 'psmv', 'psvr', 'rs', 'v4l2', 'vive', 'survive'],
choices: ['auto', 'dummy', 'hdk', 'hydra', 'ns', 'ohmd', 'psmv', 'psvr', 'rs', 'v4l2', 'vive', 'survive', 'daydream', 'arduino'],
value: ['auto'],
description: 'Set of drivers to build')

View file

@ -156,3 +156,32 @@ lib_drv_survive = static_library(
dependencies: [aux, zlib, survive],
build_by_default: 'survive' in drivers,
)
lib_drv_daydream = static_library(
'drv_daydream',
files(
'daydream/daydream_device.c',
'daydream/daydream_device.h',
'daydream/daydream_interface.h',
'daydream/daydream_prober.c',
),
include_directories: [
xrt_include,
],
dependencies: [dbus, aux],
build_by_default: 'daydream' in drivers,
)
lib_drv_arduino = static_library(
'drv_arduino',
files(
'arduino/arduino_device.c',
'arduino/arduino_interface.h',
'arduino/arduino_prober.c',
),
include_directories: [
xrt_include,
],
dependencies: [dbus, aux],
build_by_default: 'arduino' in drivers,
)

View file

@ -57,6 +57,14 @@ if 'survive' in drivers
driver_libs += [lib_drv_survive]
endif
if 'daydream' in drivers
driver_libs += [lib_drv_daydream]
endif
if 'arduino' in drivers
driver_libs += [lib_drv_arduino]
endif
subdir('common')
subdir('openxr')
subdir('cli')