2021-11-03 20:06:26 +00:00
|
|
|
# Copyright 2019-2021, Collabora, Ltd.
|
|
|
|
#
|
2019-03-18 05:52:32 +00:00
|
|
|
# SPDX-License-Identifier: BSL-1.0
|
|
|
|
|
2019-12-03 20:40:55 +00:00
|
|
|
set(ENABLED_HEADSET_DRIVERS)
|
|
|
|
set(ENABLED_DRIVERS)
|
|
|
|
|
2021-11-11 23:41:58 +00:00
|
|
|
add_library(drv_includes INTERFACE)
|
|
|
|
target_include_directories(drv_includes INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
|
|
|
|
|
2020-04-29 23:11:43 +00:00
|
|
|
if(XRT_BUILD_DRIVER_ARDUINO)
|
2021-11-11 23:41:58 +00:00
|
|
|
add_library(
|
|
|
|
drv_arduino STATIC arduino/arduino_device.c arduino/arduino_interface.h
|
|
|
|
arduino/arduino_prober.c
|
|
|
|
)
|
2020-03-14 23:33:49 +00:00
|
|
|
target_link_libraries(drv_arduino PRIVATE xrt-interfaces aux_util aux_os)
|
|
|
|
list(APPEND ENABLED_DRIVERS arduino)
|
|
|
|
endif()
|
|
|
|
|
2020-04-29 23:11:43 +00:00
|
|
|
if(XRT_BUILD_DRIVER_DAYDREAM)
|
2021-11-11 23:41:58 +00:00
|
|
|
add_library(
|
|
|
|
drv_daydream STATIC daydream/daydream_device.c daydream/daydream_device.h
|
|
|
|
daydream/daydream_interface.h daydream/daydream_prober.c
|
|
|
|
)
|
2020-03-05 11:47:39 +00:00
|
|
|
target_link_libraries(drv_daydream PRIVATE xrt-interfaces aux_util aux_os)
|
|
|
|
list(APPEND ENABLED_DRIVERS daydream)
|
|
|
|
endif()
|
|
|
|
|
2021-06-10 19:18:34 +00:00
|
|
|
if(XRT_BUILD_DRIVER_DEPTHAI)
|
2021-11-11 23:41:58 +00:00
|
|
|
add_library(drv_depthai STATIC depthai/depthai_driver.cpp depthai/depthai_interface.h)
|
|
|
|
target_link_libraries(
|
|
|
|
drv_depthai
|
|
|
|
PRIVATE
|
|
|
|
xrt-interfaces
|
|
|
|
aux_os
|
|
|
|
${OpenCV_LIBRARIES}
|
|
|
|
depthai::opencv
|
|
|
|
depthai::core
|
|
|
|
XLink
|
2021-06-10 19:18:34 +00:00
|
|
|
)
|
|
|
|
target_include_directories(drv_depthai PRIVATE ${OpenCV_INCLUDE_DIRS})
|
|
|
|
list(APPEND ENABLED_DRIVERS depthai)
|
|
|
|
endif()
|
|
|
|
|
2020-04-29 23:11:43 +00:00
|
|
|
if(XRT_BUILD_DRIVER_DUMMY)
|
2021-11-11 23:41:58 +00:00
|
|
|
add_library(drv_dummy STATIC dummy/dummy_hmd.c dummy/dummy_interface.h dummy/dummy_prober.c)
|
2020-03-03 23:24:39 +00:00
|
|
|
target_link_libraries(drv_dummy PRIVATE xrt-interfaces aux_util)
|
2020-01-25 14:36:31 +00:00
|
|
|
list(APPEND ENABLED_HEADSET_DRIVERS dummy)
|
|
|
|
endif()
|
|
|
|
|
2021-03-11 14:25:00 +00:00
|
|
|
if(XRT_BUILD_DRIVER_QWERTY)
|
2021-11-11 23:41:58 +00:00
|
|
|
add_library(
|
|
|
|
drv_qwerty STATIC
|
2021-03-11 14:25:00 +00:00
|
|
|
qwerty/qwerty_device.c
|
|
|
|
qwerty/qwerty_device.h
|
|
|
|
qwerty/qwerty_interface.h
|
|
|
|
qwerty/qwerty_prober.c
|
2021-11-11 23:41:58 +00:00
|
|
|
qwerty/qwerty_sdl.c
|
2021-04-14 18:55:01 +00:00
|
|
|
)
|
2021-11-11 23:41:58 +00:00
|
|
|
target_link_libraries(drv_qwerty PRIVATE xrt-interfaces aux_util ${SDL2_LIBRARIES})
|
|
|
|
target_include_directories(drv_qwerty PRIVATE ${SDL2_INCLUDE_DIRS})
|
2021-03-11 14:25:00 +00:00
|
|
|
list(APPEND ENABLED_DRIVERS qwerty)
|
|
|
|
|
|
|
|
add_library(drv_qwerty_includes INTERFACE)
|
|
|
|
target_include_directories(drv_qwerty_includes INTERFACE qwerty)
|
|
|
|
endif()
|
|
|
|
|
2020-04-29 23:11:43 +00:00
|
|
|
if(XRT_BUILD_DRIVER_HDK)
|
2021-11-11 23:41:58 +00:00
|
|
|
set(HDK_SOURCE_FILES)
|
2021-11-03 20:06:26 +00:00
|
|
|
|
2021-11-11 23:41:58 +00:00
|
|
|
add_library(
|
|
|
|
drv_hdk STATIC hdk/hdk_device.cpp hdk/hdk_device.h hdk/hdk_interface.h
|
|
|
|
hdk/hdk_prober.c
|
|
|
|
)
|
2020-03-03 23:24:39 +00:00
|
|
|
target_link_libraries(drv_hdk PRIVATE xrt-interfaces aux_math)
|
2019-12-03 20:40:55 +00:00
|
|
|
list(APPEND ENABLED_HEADSET_DRIVERS hdk)
|
2019-03-18 05:52:32 +00:00
|
|
|
endif()
|
2019-04-29 16:18:09 +00:00
|
|
|
|
2020-04-29 23:11:43 +00:00
|
|
|
if(XRT_BUILD_DRIVER_HYDRA)
|
2021-11-11 23:41:58 +00:00
|
|
|
set(HYDRA_SOURCE_FILES)
|
2019-06-19 21:50:55 +00:00
|
|
|
|
2021-11-11 23:41:58 +00:00
|
|
|
add_library(drv_hydra STATIC hydra/hydra_driver.c hydra/hydra_interface.h)
|
2020-03-03 23:24:39 +00:00
|
|
|
target_link_libraries(drv_hydra PRIVATE xrt-interfaces aux_os)
|
2019-12-03 20:40:55 +00:00
|
|
|
list(APPEND ENABLED_DRIVERS hydra)
|
2019-06-19 21:50:55 +00:00
|
|
|
endif()
|
|
|
|
|
2020-04-29 23:11:43 +00:00
|
|
|
if(XRT_BUILD_DRIVER_NS)
|
2021-11-11 23:41:58 +00:00
|
|
|
add_library(
|
|
|
|
drv_ns STATIC
|
2021-06-21 17:28:01 +00:00
|
|
|
north_star/distortion_3d/utility_northstar.h
|
|
|
|
north_star/distortion_3d/deformation_northstar.h
|
|
|
|
north_star/distortion_3d/deformation_northstar.cpp
|
2020-02-09 16:53:47 +00:00
|
|
|
north_star/ns_hmd.h
|
2020-01-24 21:35:12 +00:00
|
|
|
north_star/ns_hmd.c
|
|
|
|
north_star/ns_interface.h
|
2021-11-11 23:41:58 +00:00
|
|
|
north_star/ns_prober.c
|
|
|
|
)
|
2020-03-31 19:59:02 +00:00
|
|
|
target_link_libraries(drv_ns PRIVATE xrt-interfaces aux_math xrt-external-cjson)
|
2020-01-24 21:35:12 +00:00
|
|
|
list(APPEND ENABLED_HEADSET_DRIVERS ns)
|
|
|
|
endif()
|
|
|
|
|
2021-03-29 22:31:12 +00:00
|
|
|
if(XRT_BUILD_DRIVER_ULV2)
|
2021-11-11 23:41:58 +00:00
|
|
|
add_library(drv_ulv2 STATIC ultraleap_v2/ulv2_driver.cpp ultraleap_v2/ulv2_interface.h)
|
2021-06-22 15:06:58 +00:00
|
|
|
target_link_libraries(drv_ulv2 PRIVATE xrt-interfaces aux_util aux_math LeapV2::LeapV2)
|
2021-03-29 22:31:12 +00:00
|
|
|
endif()
|
|
|
|
|
2020-04-29 23:11:43 +00:00
|
|
|
if(XRT_BUILD_DRIVER_OHMD)
|
2021-11-11 23:41:58 +00:00
|
|
|
add_library(
|
|
|
|
drv_ohmd STATIC ohmd/oh_device.c ohmd/oh_device.h ohmd/oh_interface.h
|
|
|
|
ohmd/oh_prober.c
|
|
|
|
)
|
2020-03-03 23:24:39 +00:00
|
|
|
target_link_libraries(drv_ohmd PRIVATE xrt-interfaces OpenHMD::OpenHMD aux_util aux_math)
|
2019-12-03 20:40:55 +00:00
|
|
|
list(APPEND ENABLED_HEADSET_DRIVERS openhmd)
|
2019-04-29 16:18:09 +00:00
|
|
|
endif()
|
2019-04-20 01:23:50 +00:00
|
|
|
|
2020-04-29 23:11:43 +00:00
|
|
|
if(XRT_BUILD_DRIVER_PSMV)
|
2021-11-11 23:41:58 +00:00
|
|
|
add_library(drv_psmv STATIC psmv/psmv_driver.c psmv/psmv_interface.h)
|
|
|
|
target_link_libraries(
|
|
|
|
drv_psmv
|
|
|
|
PRIVATE xrt-interfaces
|
|
|
|
PUBLIC aux_os aux_tracking
|
|
|
|
)
|
2019-12-03 20:40:55 +00:00
|
|
|
list(APPEND ENABLED_DRIVERS psmv)
|
2019-05-31 16:52:54 +00:00
|
|
|
endif()
|
|
|
|
|
2020-04-29 23:11:43 +00:00
|
|
|
if(XRT_BUILD_DRIVER_PSVR)
|
2021-11-11 23:41:58 +00:00
|
|
|
add_library(
|
|
|
|
drv_psvr STATIC
|
2019-04-20 01:23:50 +00:00
|
|
|
psvr/psvr_device.c
|
|
|
|
psvr/psvr_device.h
|
|
|
|
psvr/psvr_interface.h
|
|
|
|
psvr/psvr_packet.c
|
2021-11-11 23:41:58 +00:00
|
|
|
psvr/psvr_prober.c
|
|
|
|
)
|
2020-03-03 23:24:39 +00:00
|
|
|
target_link_libraries(drv_psvr PRIVATE xrt-interfaces HIDAPI::hidapi aux_util)
|
2020-07-16 01:55:15 +00:00
|
|
|
target_include_directories(drv_psvr PRIVATE ${HIDAPI_INCLUDE_DIRS})
|
2019-12-03 20:40:55 +00:00
|
|
|
list(APPEND ENABLED_HEADSET_DRIVERS psvr)
|
2019-04-20 01:23:50 +00:00
|
|
|
endif()
|
2019-07-22 18:21:04 +00:00
|
|
|
|
2020-04-29 23:11:43 +00:00
|
|
|
if(XRT_BUILD_DRIVER_RS)
|
2021-11-11 23:41:58 +00:00
|
|
|
add_library(
|
|
|
|
drv_rs STATIC
|
2021-09-17 13:52:50 +00:00
|
|
|
realsense/rs_ddev.c
|
2021-09-21 20:11:00 +00:00
|
|
|
realsense/rs_hdev.c
|
2021-02-09 16:38:35 +00:00
|
|
|
realsense/rs_prober.c
|
2021-09-17 14:08:01 +00:00
|
|
|
realsense/rs_driver.h
|
2021-11-11 23:41:58 +00:00
|
|
|
realsense/rs_interface.h
|
|
|
|
)
|
2020-03-04 15:31:36 +00:00
|
|
|
target_link_libraries(drv_rs PRIVATE xrt-interfaces realsense2::realsense2 aux_util)
|
2020-02-09 15:36:16 +00:00
|
|
|
list(APPEND ENABLED_HEADSET_DRIVERS rs)
|
|
|
|
endif()
|
|
|
|
|
2020-10-13 17:18:33 +00:00
|
|
|
if(XRT_BUILD_DRIVER_REMOTE)
|
2021-11-11 23:41:58 +00:00
|
|
|
add_library(
|
|
|
|
drv_remote STATIC
|
2020-10-13 17:18:33 +00:00
|
|
|
remote/r_device.c
|
|
|
|
remote/r_hmd.c
|
|
|
|
remote/r_hub.c
|
|
|
|
remote/r_interface.h
|
2021-11-11 23:41:58 +00:00
|
|
|
remote/r_internal.h
|
|
|
|
)
|
2020-10-13 17:18:33 +00:00
|
|
|
target_link_libraries(drv_remote PRIVATE xrt-interfaces aux_util)
|
|
|
|
list(APPEND ENABLED_HEADSET_DRIVERS remote)
|
|
|
|
endif()
|
|
|
|
|
2021-01-24 22:27:09 +00:00
|
|
|
set(VIVE_CONFIG_INCLUDE "${CMAKE_CURRENT_SOURCE_DIR}/vive")
|
2021-01-24 22:19:21 +00:00
|
|
|
if(XRT_BUILD_DRIVER_VIVE)
|
2021-11-11 23:41:58 +00:00
|
|
|
add_library(
|
|
|
|
drv_vive STATIC
|
2021-01-24 22:19:21 +00:00
|
|
|
vive/vive_device.h
|
|
|
|
vive/vive_device.c
|
|
|
|
vive/vive_prober.h
|
|
|
|
vive/vive_prober.c
|
|
|
|
vive/vive_protocol.c
|
|
|
|
vive/vive_protocol.h
|
|
|
|
vive/vive_controller.h
|
|
|
|
vive/vive_controller.c
|
|
|
|
vive/vive_lighthouse.h
|
2021-11-11 23:41:58 +00:00
|
|
|
vive/vive_lighthouse.c
|
|
|
|
)
|
|
|
|
target_link_libraries(
|
|
|
|
drv_vive
|
|
|
|
PRIVATE
|
|
|
|
xrt-interfaces
|
|
|
|
aux_os
|
|
|
|
aux_util
|
|
|
|
aux_math
|
|
|
|
xrt-external-cjson
|
|
|
|
aux_vive
|
|
|
|
)
|
2020-03-03 23:24:39 +00:00
|
|
|
target_link_libraries(drv_vive PRIVATE ${ZLIB_LIBRARIES})
|
2021-02-01 15:39:44 +00:00
|
|
|
target_include_directories(drv_vive PRIVATE ${ZLIB_INCLUDE_DIRS})
|
2019-12-03 20:40:55 +00:00
|
|
|
list(APPEND ENABLED_HEADSET_DRIVERS vive)
|
2021-09-02 06:31:46 +00:00
|
|
|
|
2021-11-11 23:41:58 +00:00
|
|
|
if(XRT_BUILD_DRIVER_HANDTRACKING)
|
2021-09-02 06:31:46 +00:00
|
|
|
target_link_libraries(drv_vive PRIVATE drv_ht)
|
|
|
|
endif()
|
2019-10-02 11:00:52 +00:00
|
|
|
endif()
|
2019-07-22 18:21:04 +00:00
|
|
|
|
2020-04-29 23:11:43 +00:00
|
|
|
if(XRT_HAVE_V4L2)
|
2021-11-03 20:06:26 +00:00
|
|
|
add_library(drv_v4l2 STATIC v4l2/v4l2_driver.c)
|
2021-11-11 23:41:58 +00:00
|
|
|
target_link_libraries(drv_v4l2 PRIVATE xrt-interfaces aux_os aux_util)
|
2019-12-03 20:40:55 +00:00
|
|
|
list(APPEND ENABLED_DRIVERS v4l2)
|
|
|
|
endif()
|
|
|
|
|
2021-02-01 19:04:39 +00:00
|
|
|
if(XRT_BUILD_DRIVER_VF)
|
2021-11-03 20:06:26 +00:00
|
|
|
add_library(drv_vf STATIC vf/vf_driver.c)
|
2021-07-13 19:48:46 +00:00
|
|
|
target_link_libraries(drv_vf PRIVATE xrt-interfaces aux_os aux_util ${GST_LIBRARIES})
|
2020-11-26 19:16:02 +00:00
|
|
|
target_include_directories(drv_vf PRIVATE ${GST_INCLUDE_DIRS})
|
|
|
|
list(APPEND ENABLED_DRIVERS vf)
|
|
|
|
endif()
|
|
|
|
|
2021-09-03 01:49:56 +00:00
|
|
|
if(XRT_BUILD_DRIVER_HANDTRACKING)
|
2021-11-11 23:41:58 +00:00
|
|
|
add_library(
|
|
|
|
drv_ht STATIC
|
2021-11-05 01:23:52 +00:00
|
|
|
ht/ht_algorithm.cpp
|
2021-09-03 01:49:56 +00:00
|
|
|
ht/ht_driver.cpp
|
|
|
|
ht/ht_driver.hpp
|
|
|
|
ht/ht_interface.h
|
2021-11-05 00:16:35 +00:00
|
|
|
ht/ht_models.cpp
|
2021-11-04 23:01:34 +00:00
|
|
|
ht/ht_hand_math.cpp
|
2021-11-04 23:29:17 +00:00
|
|
|
ht/ht_image_math.cpp
|
2021-11-11 23:41:58 +00:00
|
|
|
ht/ht_nms.cpp
|
|
|
|
)
|
|
|
|
target_link_libraries(
|
|
|
|
drv_ht
|
|
|
|
PRIVATE
|
|
|
|
xrt-interfaces
|
|
|
|
aux_os
|
|
|
|
aux_util
|
|
|
|
aux_math
|
|
|
|
aux_gstreamer
|
|
|
|
ONNXRuntime::ONNXRuntime
|
|
|
|
${OpenCV_LIBRARIES}
|
|
|
|
)
|
2021-09-03 01:49:56 +00:00
|
|
|
target_include_directories(drv_ht PRIVATE ${OpenCV_INCLUDE_DIRS} ${EIGEN3_INCLUDE_DIR})
|
|
|
|
list(APPEND ENABLED_DRIVERS ht)
|
|
|
|
endif()
|
|
|
|
|
2021-11-11 23:41:58 +00:00
|
|
|
if(XRT_BUILD_DRIVER_SURVIVE)
|
|
|
|
add_library(
|
|
|
|
drv_survive STATIC survive/survive_driver.c survive/survive_driver.h
|
|
|
|
survive/survive_interface.h survive/survive_prober.c
|
|
|
|
)
|
|
|
|
target_link_libraries(
|
|
|
|
drv_survive
|
|
|
|
PRIVATE
|
|
|
|
xrt-interfaces
|
|
|
|
aux_os
|
|
|
|
aux_util
|
|
|
|
aux_math
|
|
|
|
aux_vive
|
|
|
|
PkgConfig::SURVIVE
|
|
|
|
)
|
2019-03-12 01:02:06 +00:00
|
|
|
list(APPEND ENABLED_HEADSET_DRIVERS survive)
|
2021-09-03 00:18:53 +00:00
|
|
|
|
2021-11-11 23:41:58 +00:00
|
|
|
if(XRT_BUILD_DRIVER_HANDTRACKING)
|
2021-09-03 00:18:53 +00:00
|
|
|
target_link_libraries(drv_survive PRIVATE drv_ht)
|
|
|
|
endif()
|
2019-03-12 01:02:06 +00:00
|
|
|
endif()
|
|
|
|
|
2020-10-23 08:28:50 +00:00
|
|
|
if(XRT_BUILD_DRIVER_ANDROID)
|
2021-11-11 23:41:58 +00:00
|
|
|
add_library(
|
|
|
|
drv_android STATIC android/android_prober.c android/android_prober.h
|
|
|
|
android/android_sensors.c android/android_sensors.h
|
|
|
|
)
|
|
|
|
target_link_libraries(
|
|
|
|
drv_android
|
|
|
|
PRIVATE
|
|
|
|
xrt-interfaces
|
|
|
|
aux_util
|
|
|
|
aux_os
|
|
|
|
aux_android
|
|
|
|
${ANDROID_LIBRARY}
|
|
|
|
)
|
2020-10-23 08:28:50 +00:00
|
|
|
list(APPEND ENABLED_DRIVERS android)
|
|
|
|
endif()
|
|
|
|
|
2021-11-11 23:41:58 +00:00
|
|
|
if(XRT_BUILD_DRIVER_ILLIXR)
|
|
|
|
add_library(
|
|
|
|
drv_illixr STATIC
|
2020-12-29 23:44:57 +00:00
|
|
|
illixr/illixr_device.cpp
|
|
|
|
illixr/illixr_interface.h
|
|
|
|
illixr/illixr_prober.c
|
|
|
|
illixr/illixr_component.cpp
|
2021-11-11 23:41:58 +00:00
|
|
|
illixr/illixr_component.h
|
|
|
|
)
|
2020-12-29 23:44:57 +00:00
|
|
|
target_link_libraries(drv_illixr PUBLIC ${CMAKE_DL_LIBS} xrt-interfaces aux_util aux_os)
|
|
|
|
target_include_directories(drv_illixr PUBLIC ${ILLIXR_PATH})
|
|
|
|
list(APPEND ENABLED_HEADSET_DRIVERS illixr)
|
|
|
|
endif()
|
|
|
|
|
2021-11-11 23:41:58 +00:00
|
|
|
add_library(drv_multi STATIC multi_wrapper/multi.c multi_wrapper/multi.h)
|
xrt: implement multi device wrappers for tracking overrides
Example config ~/.config/monado/config_v0.json
{
"active": "tracking",
"tracking": {
"version": 0,
"tracking_overrides": [
{
"target_device_serial": "LHR-E8CC625B",
"tracker_device_serial": "LHR-1D80A098",
"offset": {
"orientation": {
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"position": {
"x": 0,
"y": 0,
"z": 0
}
}
}
]
}
}
v2: Add multi device wrapper
2021-02-09 02:19:56 +00:00
|
|
|
target_link_libraries(drv_multi PUBLIC xrt-interfaces aux_util)
|
|
|
|
list(APPEND ENABLED_HEADSET_DRIVERS drv_multi)
|
|
|
|
|
2020-12-04 16:43:46 +00:00
|
|
|
if(XRT_BUILD_DRIVER_WMR)
|
2021-11-11 23:41:58 +00:00
|
|
|
add_library(
|
|
|
|
drv_wmr STATIC
|
2021-11-13 16:01:24 +00:00
|
|
|
wmr/wmr_camera.h
|
2020-12-04 16:43:46 +00:00
|
|
|
wmr/wmr_common.h
|
2021-04-18 08:46:18 +00:00
|
|
|
wmr/wmr_config.c
|
|
|
|
wmr/wmr_config.h
|
2021-11-13 02:35:13 +00:00
|
|
|
wmr/wmr_bt_controller.c
|
|
|
|
wmr/wmr_bt_controller.h
|
2020-12-04 16:43:46 +00:00
|
|
|
wmr/wmr_hmd.c
|
|
|
|
wmr/wmr_hmd.h
|
|
|
|
wmr/wmr_interface.h
|
|
|
|
wmr/wmr_prober.c
|
|
|
|
wmr/wmr_protocol.c
|
2021-11-11 23:41:58 +00:00
|
|
|
wmr/wmr_protocol.h
|
2021-11-15 01:05:19 +00:00
|
|
|
wmr/wmr_controller_protocol.c
|
|
|
|
wmr/wmr_controller_protocol.h
|
2021-11-11 23:41:58 +00:00
|
|
|
)
|
2021-06-20 15:13:22 +00:00
|
|
|
target_link_libraries(drv_wmr PRIVATE xrt-interfaces aux_util aux_math xrt-external-cjson)
|
2020-12-04 16:43:46 +00:00
|
|
|
list(APPEND ENABLED_HEADSET_DRIVERS wmr)
|
2021-11-13 16:01:24 +00:00
|
|
|
|
|
|
|
# Can only build camera support with libusb
|
|
|
|
if(XRT_HAVE_LIBUSB)
|
|
|
|
target_sources(drv_wmr PRIVATE wmr/wmr_camera.c)
|
|
|
|
target_include_directories(drv_wmr PUBLIC ${LIBUSB1_INCLUDE_DIRS})
|
|
|
|
target_link_libraries(drv_wmr PRIVATE ${LIBUSB1_LIBRARIES})
|
|
|
|
endif()
|
2020-12-04 16:43:46 +00:00
|
|
|
endif()
|
|
|
|
|
2021-08-20 14:28:30 +00:00
|
|
|
if(XRT_BUILD_DRIVER_EUROC)
|
2021-11-11 23:41:58 +00:00
|
|
|
add_library(
|
|
|
|
drv_euroc STATIC euroc/euroc_player.cpp euroc/euroc_driver.h euroc/euroc_device.c
|
|
|
|
euroc/euroc_interface.h
|
|
|
|
)
|
|
|
|
target_link_libraries(
|
|
|
|
drv_euroc PRIVATE xrt-interfaces aux_util aux_tracking ${OpenCV_LIBRARIES}
|
|
|
|
)
|
2021-08-20 14:28:30 +00:00
|
|
|
target_include_directories(drv_euroc PRIVATE ${OpenCV_INCLUDE_DIRS})
|
|
|
|
list(APPEND ENABLED_DRIVERS euroc)
|
|
|
|
endif()
|
|
|
|
|
2021-11-03 21:15:36 +00:00
|
|
|
if(XRT_BUILD_SAMPLES)
|
|
|
|
# We build the sample driver to make sure it stays valid,
|
|
|
|
# but it never gets linked into a final target.
|
2021-11-11 23:41:58 +00:00
|
|
|
add_library(
|
|
|
|
drv_sample STATIC sample/sample_hmd.c sample/sample_interface.h
|
|
|
|
sample/sample_prober.c
|
|
|
|
)
|
2021-11-03 21:15:36 +00:00
|
|
|
target_link_libraries(drv_sample PRIVATE xrt-interfaces aux_util)
|
|
|
|
endif()
|
2021-11-03 20:34:05 +00:00
|
|
|
|
2019-12-03 20:40:55 +00:00
|
|
|
if(ENABLED_HEADSET_DRIVERS)
|
|
|
|
set(ENABLED_DRIVERS ${ENABLED_HEADSET_DRIVERS} ${ENABLED_DRIVERS})
|
|
|
|
list(SORT ENABLED_DRIVERS)
|
|
|
|
string(REPLACE ";" " " ENABLED_DRIVERS "${ENABLED_DRIVERS}")
|
|
|
|
message(STATUS "Enabled drivers: ${ENABLED_DRIVERS}")
|
|
|
|
else()
|
|
|
|
message(FATAL_ERROR "You must enable at least one headset driver to build Monado.")
|
2021-01-24 22:19:21 +00:00
|
|
|
endif()
|