d/rs: Meson build

This commit is contained in:
Jakob Bornecrantz 2020-02-09 15:36:36 +00:00
parent 53201debdc
commit d6d934e35f
6 changed files with 27 additions and 1 deletions

View file

@ -63,6 +63,7 @@ eigen3 = dependency('eigen3')
libjpeg = dependency('libjpeg', required: false)
libusb = dependency('libusb-1.0', required: false)
opengl = dependency('gl', required: get_option('opengl'))
rs = dependency('realsense2', required: false)
sdl2 = dependency('sdl2', required: get_option('gui'))
udev = dependency('libudev', required: false)
libuvc = dependency('libuvc', required: false)
@ -173,6 +174,12 @@ if zlib.found() and ('auto' in drivers or 'vive' in drivers)
endif
endif
if rs.found() and ('auto' in drivers or 'rs' in drivers)
if 'rs' not in drivers
drivers += ['rs']
endif
endif
if v4l2.found() and ('auto' in drivers or 'v4l2' in drivers)
if 'v4l2' not in drivers
drivers += ['v4l2']

View file

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

View file

@ -10,6 +10,7 @@ conf_data.set('XRT_BUILD_DRIVER_NS', 'ns' in drivers)
conf_data.set('XRT_BUILD_DRIVER_OHMD', 'ohmd' in drivers)
conf_data.set('XRT_BUILD_DRIVER_PSMV', 'psmv' in drivers)
conf_data.set('XRT_BUILD_DRIVER_PSVR', 'psvr' in drivers)
conf_data.set('XRT_BUILD_DRIVER_RS', 'rs' in drivers)
conf_data.set('XRT_BUILD_DRIVER_V4L2', 'v4l2' in drivers)
conf_data.set('XRT_BUILD_DRIVER_VIVE', 'vive' in drivers)

View file

@ -23,6 +23,8 @@
#mesondefine XRT_BUILD_DRIVER_PSVR
#mesondefine XRT_BUILD_DRIVER_RS
#mesondefine XRT_BUILD_DRIVER_V4L2
#mesondefine XRT_BUILD_DRIVER_VIVE

View file

@ -89,6 +89,17 @@ lib_drv_psvr = static_library(
build_by_default: 'psvr' in drivers,
)
lib_drv_rs = static_library(
'drv_rs',
files(
'realsense/rs_6dof.c',
'realsense/rs_interface.h',
),
include_directories: xrt_include,
dependencies: [aux, rs],
build_by_default: 'rs' in drivers,
)
lib_drv_v4l2 = static_library(
'drv_v4l2',
files(

View file

@ -40,6 +40,11 @@ if 'psvr' in drivers
driver_libs += [lib_drv_psvr]
endif
if 'rs' in drivers
driver_libs += [lib_drv_rs]
driver_deps += [rs]
endif
if 'v4l2' in drivers
driver_libs += [lib_drv_v4l2]
driver_deps += [v4l2]