Skip to content
Snippets Groups Projects
Commit d6d934e3 authored by Jakob Bornecrantz's avatar Jakob Bornecrantz
Browse files

d/rs: Meson build

parent 53201deb
No related branches found
No related tags found
No related merge requests found
...@@ -63,6 +63,7 @@ eigen3 = dependency('eigen3') ...@@ -63,6 +63,7 @@ eigen3 = dependency('eigen3')
libjpeg = dependency('libjpeg', required: false) libjpeg = dependency('libjpeg', required: false)
libusb = dependency('libusb-1.0', required: false) libusb = dependency('libusb-1.0', required: false)
opengl = dependency('gl', required: get_option('opengl')) opengl = dependency('gl', required: get_option('opengl'))
rs = dependency('realsense2', required: false)
sdl2 = dependency('sdl2', required: get_option('gui')) sdl2 = dependency('sdl2', required: get_option('gui'))
udev = dependency('libudev', required: false) udev = dependency('libudev', required: false)
libuvc = dependency('libuvc', required: false) libuvc = dependency('libuvc', required: false)
...@@ -173,6 +174,12 @@ if zlib.found() and ('auto' in drivers or 'vive' in drivers) ...@@ -173,6 +174,12 @@ if zlib.found() and ('auto' in drivers or 'vive' in drivers)
endif endif
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.found() and ('auto' in drivers or 'v4l2' in drivers)
if 'v4l2' not in drivers if 'v4l2' not in drivers
drivers += ['v4l2'] drivers += ['v4l2']
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
option('drivers', option('drivers',
type: 'array', 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'], value: ['auto'],
description: 'Set of drivers to build') description: 'Set of drivers to build')
......
...@@ -10,6 +10,7 @@ conf_data.set('XRT_BUILD_DRIVER_NS', 'ns' in drivers) ...@@ -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_OHMD', 'ohmd' in drivers)
conf_data.set('XRT_BUILD_DRIVER_PSMV', 'psmv' 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_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_V4L2', 'v4l2' in drivers)
conf_data.set('XRT_BUILD_DRIVER_VIVE', 'vive' in drivers) conf_data.set('XRT_BUILD_DRIVER_VIVE', 'vive' in drivers)
......
...@@ -23,6 +23,8 @@ ...@@ -23,6 +23,8 @@
#mesondefine XRT_BUILD_DRIVER_PSVR #mesondefine XRT_BUILD_DRIVER_PSVR
#mesondefine XRT_BUILD_DRIVER_RS
#mesondefine XRT_BUILD_DRIVER_V4L2 #mesondefine XRT_BUILD_DRIVER_V4L2
#mesondefine XRT_BUILD_DRIVER_VIVE #mesondefine XRT_BUILD_DRIVER_VIVE
...@@ -89,6 +89,17 @@ lib_drv_psvr = static_library( ...@@ -89,6 +89,17 @@ lib_drv_psvr = static_library(
build_by_default: 'psvr' in drivers, 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( lib_drv_v4l2 = static_library(
'drv_v4l2', 'drv_v4l2',
files( files(
......
...@@ -40,6 +40,11 @@ if 'psvr' in drivers ...@@ -40,6 +40,11 @@ if 'psvr' in drivers
driver_libs += [lib_drv_psvr] driver_libs += [lib_drv_psvr]
endif endif
if 'rs' in drivers
driver_libs += [lib_drv_rs]
driver_deps += [rs]
endif
if 'v4l2' in drivers if 'v4l2' in drivers
driver_libs += [lib_drv_v4l2] driver_libs += [lib_drv_v4l2]
driver_deps += [v4l2] driver_deps += [v4l2]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment