build: s/rs/realsense/g

This commit is contained in:
Jakob Bornecrantz 2021-12-06 20:53:00 +00:00
parent 849f401a6a
commit 3e38ada9a5
11 changed files with 70 additions and 47 deletions

View file

@ -242,7 +242,7 @@ cmake_dependent_option(XRT_HAVE_KIMERA_SLAM "Enable Kimera support" ON "kimera_v
cmake_dependent_option(XRT_HAVE_BASALT_SLAM "Enable Basalt support" ON "basalt_FOUND" OFF) cmake_dependent_option(XRT_HAVE_BASALT_SLAM "Enable Basalt support" ON "basalt_FOUND" OFF)
cmake_dependent_option(XRT_HAVE_SLAM "Enable SLAM tracking support" ON "SLAM;XRT_HAVE_OPENCV" OFF) cmake_dependent_option(XRT_HAVE_SLAM "Enable SLAM tracking support" ON "SLAM;XRT_HAVE_OPENCV" OFF)
cmake_dependent_option(XRT_BUILD_DRIVER_PSVR "Enable PSVR HMD driver" ON "HIDAPI_FOUND" OFF) cmake_dependent_option(XRT_BUILD_DRIVER_PSVR "Enable PSVR HMD driver" ON "HIDAPI_FOUND" OFF)
cmake_dependent_option(XRT_BUILD_DRIVER_RS "Enable RealSense device driver" ON "XRT_HAVE_REALSENSE" OFF) cmake_dependent_option(XRT_BUILD_DRIVER_REALSENSE "Enable RealSense device driver" ON "XRT_HAVE_REALSENSE" OFF)
cmake_dependent_option(XRT_BUILD_DRIVER_VIVE "Enable driver for HTC Vive, Vive Pro, Valve Index, and their controllers" ON "ZLIB_FOUND AND XRT_HAVE_LINUX" OFF) cmake_dependent_option(XRT_BUILD_DRIVER_VIVE "Enable driver for HTC Vive, Vive Pro, Valve Index, and their controllers" ON "ZLIB_FOUND AND XRT_HAVE_LINUX" OFF)
cmake_dependent_option(XRT_BUILD_DRIVER_OHMD "Enable OpenHMD driver" ON "OPENHMD_FOUND" OFF) cmake_dependent_option(XRT_BUILD_DRIVER_OHMD "Enable OpenHMD driver" ON "OPENHMD_FOUND" OFF)
cmake_dependent_option(XRT_BUILD_DRIVER_HANDTRACKING "Enable Camera Hand Tracking driver" ON "XRT_HAVE_ONNXRUNTIME AND XRT_HAVE_OPENCV AND XRT_HAVE_V4L2" OFF) cmake_dependent_option(XRT_BUILD_DRIVER_HANDTRACKING "Enable Camera Hand Tracking driver" ON "XRT_HAVE_ONNXRUNTIME AND XRT_HAVE_OPENCV AND XRT_HAVE_V4L2" OFF)
@ -447,7 +447,7 @@ message(STATUS "# DRIVER_ULV2: ${XRT_BUILD_DRIVER_ULV2}")
message(STATUS "# DRIVER_OHMD: ${XRT_BUILD_DRIVER_OHMD}") message(STATUS "# DRIVER_OHMD: ${XRT_BUILD_DRIVER_OHMD}")
message(STATUS "# DRIVER_PSMV: ${XRT_BUILD_DRIVER_PSMV}") message(STATUS "# DRIVER_PSMV: ${XRT_BUILD_DRIVER_PSMV}")
message(STATUS "# DRIVER_PSVR: ${XRT_BUILD_DRIVER_PSVR}") message(STATUS "# DRIVER_PSVR: ${XRT_BUILD_DRIVER_PSVR}")
message(STATUS "# DRIVER_RS: ${XRT_BUILD_DRIVER_RS}") message(STATUS "# DRIVER_RS: ${XRT_BUILD_DRIVER_REALSENSE}")
message(STATUS "# DRIVER_REMOTE: ${XRT_BUILD_DRIVER_REMOTE}") message(STATUS "# DRIVER_REMOTE: ${XRT_BUILD_DRIVER_REMOTE}")
message(STATUS "# DRIVER_SURVIVE: ${XRT_BUILD_DRIVER_SURVIVE}") message(STATUS "# DRIVER_SURVIVE: ${XRT_BUILD_DRIVER_SURVIVE}")
message(STATUS "# DRIVER_VF: ${XRT_BUILD_DRIVER_VF}") message(STATUS "# DRIVER_VF: ${XRT_BUILD_DRIVER_VF}")

View file

@ -36,7 +36,7 @@ PREDEFINED = VK_USE_PLATFORM_XCB_KHR \
XR_USE_GRAPHICS_API_VULKAN \ XR_USE_GRAPHICS_API_VULKAN \
XR_USE_PLATFORM_XLIB \ XR_USE_PLATFORM_XLIB \
XR_USE_TIMESPEC \ XR_USE_TIMESPEC \
XRT_BUILD_DRIVER_RS \ XRT_BUILD_DRIVER_REALSENSE \
XRT_DOXYGEN \ XRT_DOXYGEN \
XRT_FEATURE_SERVICE \ XRT_FEATURE_SERVICE \
XRT_HAVE_JPEG \ XRT_HAVE_JPEG \

View file

@ -57,30 +57,30 @@ glslangValidator = find_program('glslangValidator')
pthreads = cc.find_library('pthread', required: true) pthreads = cc.find_library('pthread', required: true)
rt = cc.find_library('rt', required: true) rt = cc.find_library('rt', required: true)
avcodec = dependency('libavcodec', required: false) avcodec = dependency('libavcodec', required: false)
egl = dependency('egl', required: get_option('egl')) egl = dependency('egl', required: get_option('egl'))
egl = egl.partial_dependency(includes: true) egl = egl.partial_dependency(includes: true)
eigen3 = dependency('eigen3') 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'))
opengles = dependency('glesv2', required: get_option('opengles')) opengles = dependency('glesv2', required: get_option('opengles'))
rs = dependency('realsense2', required: false) realsense = 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)
vulkan = dependency('vulkan', required: true) vulkan = dependency('vulkan', required: true)
zlib = dependency('zlib', required: false) zlib = dependency('zlib', required: false)
survive = dependency('survive', required: false) survive = dependency('survive', required: false)
dbus = dependency('dbus-1', required: get_option('dbus')) dbus = dependency('dbus-1', required: get_option('dbus'))
systemd = dependency('libsystemd', required: get_option('systemd')) systemd = dependency('libsystemd', required: get_option('systemd'))
libbsd = dependency('libbsd', required: get_option('libbsd')) libbsd = dependency('libbsd', required: get_option('libbsd'))
gst = dependency('gstreamer-1.0', required: false) gst = dependency('gstreamer-1.0', required: false)
gst_app = dependency('gstreamer-app-1.0', required: false) gst_app = dependency('gstreamer-app-1.0', required: false)
gst_video= dependency('gstreamer-video-1.0', required: false) gst_video = dependency('gstreamer-video-1.0', required: false)
depthai = dependency('depthai', method: 'cmake', modules : ['depthai::core', 'depthai::opencv', 'XLink'], required: false) depthai = dependency('depthai', method: 'cmake', modules : ['depthai::core', 'depthai::opencv', 'XLink'], required: false)
onnxruntime = dependency('libonnxruntime', required: false) onnxruntime = dependency('libonnxruntime', required: false)
percetto = dependency('percetto', required: false) percetto = dependency('percetto', required: false)
gst_found = gst.found() and gst_app.found() and gst_video.found() gst_found = gst.found() and gst_app.found() and gst_video.found()
@ -219,9 +219,9 @@ 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 realsense.found() and ('auto' in drivers or 'realsense' in drivers)
if 'rs' not in drivers if 'realsense' not in drivers
drivers += ['rs'] drivers += ['realsense']
endif endif
endif endif

View file

@ -3,7 +3,30 @@
option('drivers', option('drivers',
type: 'array', type: 'array',
choices: ['auto', 'dummy', 'hdk', 'hydra', 'ns', 'ohmd', 'psmv', 'psvr', 'rs', 'v4l2', 'vf', 'depthai', 'vive', 'wmr', 'survive', 'daydream', 'arduino', 'remote', 'handtracking', 'qwerty', 'ulv2', 'euroc'], choices: [
'auto',
'dummy',
'hdk',
'hydra',
'ns',
'ohmd',
'psmv',
'psvr',
'realsense',
'v4l2',
'vf',
'depthai',
'vive',
'wmr',
'survive',
'daydream',
'arduino',
'remote',
'handtracking',
'qwerty',
'ulv2',
'euroc',
],
value: ['auto'], value: ['auto'],
description: 'Set of drivers to build') description: 'Set of drivers to build')

View file

@ -138,16 +138,16 @@ if(XRT_BUILD_DRIVER_PSVR)
list(APPEND ENABLED_HEADSET_DRIVERS psvr) list(APPEND ENABLED_HEADSET_DRIVERS psvr)
endif() endif()
if(XRT_BUILD_DRIVER_RS) if(XRT_BUILD_DRIVER_REALSENSE)
add_library( add_library(
drv_rs STATIC drv_realsense STATIC
realsense/rs_ddev.c realsense/rs_ddev.c
realsense/rs_hdev.c realsense/rs_hdev.c
realsense/rs_prober.c realsense/rs_prober.c
realsense/rs_driver.h realsense/rs_driver.h
realsense/rs_interface.h realsense/rs_interface.h
) )
target_link_libraries(drv_rs PRIVATE xrt-interfaces realsense2::realsense2 aux_util) target_link_libraries(drv_realsense PRIVATE xrt-interfaces realsense2::realsense2 aux_util)
list(APPEND ENABLED_HEADSET_DRIVERS rs) list(APPEND ENABLED_HEADSET_DRIVERS rs)
endif() endif()

View file

@ -150,8 +150,8 @@ lib_drv_psvr = static_library(
build_by_default: 'psvr' in drivers, build_by_default: 'psvr' in drivers,
) )
lib_drv_rs = static_library( lib_drv_realsense = static_library(
'drv_rs', 'drv_realsense',
files( files(
'realsense/rs_ddev.c', 'realsense/rs_ddev.c',
'realsense/rs_hdev.c', 'realsense/rs_hdev.c',
@ -160,7 +160,7 @@ lib_drv_rs = static_library(
'realsense/rs_prober.c', 'realsense/rs_prober.c',
), ),
include_directories: [xrt_include,cjson_include], include_directories: [xrt_include,cjson_include],
dependencies: [aux, rs], dependencies: [aux, realsense],
build_by_default: 'rs' in drivers, build_by_default: 'rs' in drivers,
) )

View file

@ -31,7 +31,7 @@
#include "euroc/euroc_interface.h" #include "euroc/euroc_interface.h"
#endif #endif
#ifdef XRT_BUILD_DRIVER_RS #ifdef XRT_BUILD_DRIVER_REALSENSE
#include "realsense/rs_interface.h" #include "realsense/rs_interface.h"
#endif #endif
@ -1006,7 +1006,7 @@ p_open_video_device(struct xrt_prober *xp,
} }
#endif #endif
#if defined(XRT_BUILD_DRIVER_RS) #if defined(XRT_BUILD_DRIVER_REALSENSE)
int rs_source_index = debug_get_num_option_rs_source_index(); int rs_source_index = debug_get_num_option_rs_source_index();
if (rs_source_index != -1) { if (rs_source_index != -1) {
*out_xfs = rs_source_create(xfctx, rs_source_index); *out_xfs = rs_source_create(xfctx, rs_source_index);

View file

@ -31,7 +31,7 @@
DEBUG_GET_ONCE_OPTION(euroc_path, "EUROC_PATH", NULL) DEBUG_GET_ONCE_OPTION(euroc_path, "EUROC_PATH", NULL)
#endif #endif
#ifdef XRT_BUILD_DRIVER_RS #ifdef XRT_BUILD_DRIVER_REALSENSE
#include "util/u_debug.h" #include "util/u_debug.h"
DEBUG_GET_ONCE_NUM_OPTION(rs_source_index, "RS_SOURCE_INDEX", -1) DEBUG_GET_ONCE_NUM_OPTION(rs_source_index, "RS_SOURCE_INDEX", -1)
#endif #endif
@ -275,7 +275,7 @@ p_factory_ensure_slam_frameserver(struct p_factory *fact)
// SLAM tracker with RealSense frameserver // SLAM tracker with RealSense frameserver
#ifdef XRT_BUILD_DRIVER_RS #ifdef XRT_BUILD_DRIVER_REALSENSE
if (debug_get_num_option_rs_source_index() != -1) { if (debug_get_num_option_rs_source_index() != -1) {
struct xrt_slam_sinks empty_sinks = {0}; struct xrt_slam_sinks empty_sinks = {0};
struct xrt_slam_sinks *sinks = &empty_sinks; struct xrt_slam_sinks *sinks = &empty_sinks;

View file

@ -59,8 +59,8 @@ if(XRT_BUILD_DRIVER_PSVR)
target_link_libraries(target_lists PRIVATE drv_psvr) target_link_libraries(target_lists PRIVATE drv_psvr)
endif() endif()
if(XRT_BUILD_DRIVER_RS) if(XRT_BUILD_DRIVER_REALSENSE)
target_link_libraries(target_lists PRIVATE drv_rs) target_link_libraries(target_lists PRIVATE drv_realsense)
endif() endif()
if(XRT_BUILD_DRIVER_REMOTE) if(XRT_BUILD_DRIVER_REMOTE)

View file

@ -62,7 +62,7 @@
#include "illixr/illixr_interface.h" #include "illixr/illixr_interface.h"
#endif #endif
#ifdef XRT_BUILD_DRIVER_RS #ifdef XRT_BUILD_DRIVER_REALSENSE
#include "realsense/rs_interface.h" #include "realsense/rs_interface.h"
#endif #endif
@ -179,7 +179,7 @@ xrt_auto_prober_creator target_auto_list[] = {
illixr_create_auto_prober, illixr_create_auto_prober,
#endif #endif
#ifdef XRT_BUILD_DRIVER_RS #ifdef XRT_BUILD_DRIVER_REALSENSE
rs_create_auto_prober, rs_create_auto_prober,
#endif #endif

View file

@ -44,9 +44,9 @@ if 'psvr' in drivers
driver_libs += [lib_drv_psvr] driver_libs += [lib_drv_psvr]
endif endif
if 'rs' in drivers if 'realsense' in drivers
driver_libs += [lib_drv_rs] driver_libs += [lib_drv_realsense]
driver_deps += [rs] driver_deps += [realsense]
endif endif
if 'v4l2' in drivers if 'v4l2' in drivers