2023-03-03 20:42:33 +00:00
|
|
|
# Copyright 2019-2023, Collabora, Ltd.
|
2019-04-30 13:33:34 +00:00
|
|
|
# SPDX-License-Identifier: BSL-1.0
|
|
|
|
|
2020-04-11 10:09:24 +00:00
|
|
|
####
|
|
|
|
# Lists
|
|
|
|
#
|
|
|
|
|
2022-09-19 18:50:32 +00:00
|
|
|
add_library(
|
|
|
|
target_lists STATIC target_builder_interface.h target_builder_legacy.c target_lists.c
|
|
|
|
target_lists.h
|
2022-05-14 14:33:16 +00:00
|
|
|
)
|
2022-10-22 12:47:45 +00:00
|
|
|
target_link_libraries(target_lists PRIVATE xrt-interfaces aux_util aux_util_sink drv_includes)
|
2021-11-11 23:41:58 +00:00
|
|
|
target_include_directories(target_lists PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
2020-03-03 23:24:39 +00:00
|
|
|
|
2022-09-20 00:09:05 +00:00
|
|
|
###
|
2022-05-19 13:18:53 +00:00
|
|
|
# Builders
|
2022-09-20 00:09:05 +00:00
|
|
|
#
|
2022-10-22 12:48:10 +00:00
|
|
|
|
2022-05-19 13:18:53 +00:00
|
|
|
if(XRT_BUILD_DRIVER_REMOTE)
|
|
|
|
target_sources(target_lists PRIVATE target_builder_remote.c)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(XRT_BUILD_DRIVER_PSVR OR XRT_BUILD_DRIVER_PSMV)
|
|
|
|
target_sources(target_lists PRIVATE target_builder_rgb_tracking.c)
|
|
|
|
endif()
|
|
|
|
|
2022-08-15 03:39:05 +00:00
|
|
|
if(XRT_BUILD_DRIVER_RIFT_S)
|
|
|
|
target_sources(target_lists PRIVATE target_builder_rift_s.c)
|
|
|
|
endif()
|
|
|
|
|
2023-06-14 00:12:26 +00:00
|
|
|
if(XRT_BUILD_DRIVER_SURVIVE
|
|
|
|
OR XRT_BUILD_DRIVER_VIVE
|
|
|
|
OR XRT_BUILD_DRIVER_STEAMVR_LIGHTHOUSE
|
|
|
|
)
|
2022-06-23 23:51:14 +00:00
|
|
|
target_sources(target_lists PRIVATE target_builder_lighthouse.c)
|
|
|
|
endif()
|
|
|
|
|
2023-01-27 14:03:35 +00:00
|
|
|
if(XRT_BUILD_DRIVER_SIMULATED)
|
|
|
|
target_sources(target_lists PRIVATE target_builder_simulated.c)
|
|
|
|
endif()
|
|
|
|
|
2022-09-13 07:45:19 +00:00
|
|
|
if(XRT_BUILD_DRIVER_SIMULAVR)
|
2022-09-12 04:26:39 +00:00
|
|
|
target_sources(target_lists PRIVATE target_builder_simulavr.c)
|
|
|
|
endif()
|
|
|
|
|
2023-09-07 14:07:10 +00:00
|
|
|
if(XRT_BUILD_DRIVER_NA)
|
|
|
|
target_sources(target_lists PRIVATE target_builder_nreal_air.c)
|
|
|
|
target_link_libraries(target_lists PRIVATE drv_na)
|
|
|
|
endif()
|
|
|
|
|
2022-09-21 12:11:02 +00:00
|
|
|
if(XRT_BUILD_DRIVER_NS)
|
|
|
|
target_sources(target_lists PRIVATE target_builder_north_star.c)
|
|
|
|
target_link_libraries(target_lists PRIVATE drv_ns)
|
|
|
|
endif()
|
|
|
|
|
2022-12-23 18:37:54 +00:00
|
|
|
if(XRT_BUILD_DRIVER_WMR)
|
|
|
|
target_sources(target_lists PRIVATE target_builder_wmr.c)
|
|
|
|
target_link_libraries(target_lists PRIVATE drv_wmr)
|
|
|
|
endif()
|
|
|
|
|
2023-04-19 20:31:21 +00:00
|
|
|
if(XRT_BUILD_DRIVER_QWERTY)
|
|
|
|
target_sources(target_lists PRIVATE target_builder_qwerty.c)
|
|
|
|
target_link_libraries(target_lists PRIVATE drv_qwerty)
|
|
|
|
endif()
|
|
|
|
|
2022-09-20 00:09:05 +00:00
|
|
|
###
|
2022-05-19 13:18:53 +00:00
|
|
|
# Drivers
|
2022-09-20 00:09:05 +00:00
|
|
|
#
|
|
|
|
|
2020-04-29 23:11:43 +00:00
|
|
|
if(XRT_BUILD_DRIVER_ARDUINO)
|
2020-03-14 23:33:49 +00:00
|
|
|
target_link_libraries(target_lists PRIVATE drv_arduino)
|
|
|
|
endif()
|
|
|
|
|
2022-09-21 12:56:33 +00:00
|
|
|
target_link_libraries(target_lists PRIVATE drv_cemu)
|
|
|
|
|
2020-04-29 23:11:43 +00:00
|
|
|
if(XRT_BUILD_DRIVER_DAYDREAM)
|
2020-03-05 11:47:39 +00:00
|
|
|
target_link_libraries(target_lists PRIVATE drv_daydream)
|
|
|
|
endif()
|
|
|
|
|
2022-05-31 01:21:14 +00:00
|
|
|
if(XRT_BUILD_DRIVER_DEPTHAI)
|
|
|
|
target_link_libraries(target_lists PRIVATE drv_depthai)
|
|
|
|
endif()
|
|
|
|
|
2022-05-17 20:18:08 +00:00
|
|
|
if(XRT_BUILD_DRIVER_SIMULATED)
|
|
|
|
target_link_libraries(target_lists PRIVATE drv_simulated)
|
2020-03-03 23:24:39 +00:00
|
|
|
endif()
|
|
|
|
|
2020-04-29 23:11:43 +00:00
|
|
|
if(XRT_BUILD_DRIVER_HDK)
|
2020-03-03 23:24:39 +00:00
|
|
|
target_link_libraries(target_lists PRIVATE drv_hdk)
|
|
|
|
endif()
|
|
|
|
|
2020-04-29 23:11:43 +00:00
|
|
|
if(XRT_BUILD_DRIVER_HYDRA)
|
2020-03-03 23:24:39 +00:00
|
|
|
target_link_libraries(target_lists PRIVATE drv_hydra)
|
|
|
|
endif()
|
|
|
|
|
2023-09-07 14:07:10 +00:00
|
|
|
if(XRT_BUILD_DRIVER_NA)
|
|
|
|
target_link_libraries(target_lists PRIVATE drv_na)
|
|
|
|
endif()
|
|
|
|
|
2020-04-29 23:11:43 +00:00
|
|
|
if(XRT_BUILD_DRIVER_NS)
|
2020-03-03 23:24:39 +00:00
|
|
|
target_link_libraries(target_lists PRIVATE drv_ns)
|
|
|
|
endif()
|
|
|
|
|
2022-09-21 12:56:33 +00:00
|
|
|
if(XRT_BUILD_DRIVER_TWRAP)
|
|
|
|
target_link_libraries(target_lists PRIVATE drv_twrap)
|
|
|
|
endif()
|
|
|
|
|
2021-03-29 22:31:12 +00:00
|
|
|
if(XRT_BUILD_DRIVER_ULV2)
|
|
|
|
target_link_libraries(target_lists PRIVATE drv_ulv2)
|
|
|
|
endif()
|
|
|
|
|
2020-04-29 23:11:43 +00:00
|
|
|
if(XRT_BUILD_DRIVER_OHMD)
|
2020-03-03 23:24:39 +00:00
|
|
|
target_link_libraries(target_lists PRIVATE drv_ohmd)
|
|
|
|
endif()
|
|
|
|
|
2022-07-25 22:57:26 +00:00
|
|
|
if(XRT_BUILD_DRIVER_OPENGLOVES)
|
|
|
|
target_link_libraries(target_lists PRIVATE drv_opengloves)
|
|
|
|
endif()
|
|
|
|
|
2020-11-23 22:04:29 +00:00
|
|
|
if(XRT_BUILD_DRIVER_HANDTRACKING)
|
|
|
|
target_link_libraries(target_lists PRIVATE drv_ht)
|
|
|
|
endif()
|
|
|
|
|
2020-04-29 23:11:43 +00:00
|
|
|
if(XRT_BUILD_DRIVER_PSMV)
|
2020-03-03 23:24:39 +00:00
|
|
|
target_link_libraries(target_lists PRIVATE drv_psmv)
|
|
|
|
endif()
|
|
|
|
|
2023-03-19 02:35:09 +00:00
|
|
|
if(XRT_BUILD_DRIVER_PSSENSE)
|
|
|
|
target_link_libraries(target_lists PRIVATE drv_pssense)
|
|
|
|
endif()
|
|
|
|
|
2020-04-29 23:11:43 +00:00
|
|
|
if(XRT_BUILD_DRIVER_PSVR)
|
2020-03-03 23:24:39 +00:00
|
|
|
target_link_libraries(target_lists PRIVATE drv_psvr)
|
|
|
|
endif()
|
|
|
|
|
2021-12-06 20:53:00 +00:00
|
|
|
if(XRT_BUILD_DRIVER_REALSENSE)
|
|
|
|
target_link_libraries(target_lists PRIVATE drv_realsense)
|
2020-03-03 23:24:39 +00:00
|
|
|
endif()
|
|
|
|
|
2020-10-13 17:18:33 +00:00
|
|
|
if(XRT_BUILD_DRIVER_REMOTE)
|
|
|
|
target_link_libraries(target_lists PRIVATE drv_remote)
|
|
|
|
endif()
|
|
|
|
|
2022-04-16 12:56:41 +00:00
|
|
|
if(XRT_BUILD_DRIVER_RIFT_S)
|
|
|
|
target_link_libraries(target_lists PRIVATE drv_rift_s)
|
|
|
|
endif()
|
|
|
|
|
2023-08-14 12:59:20 +00:00
|
|
|
if(XRT_BUILD_DRIVER_ROKID)
|
|
|
|
target_link_libraries(target_lists PRIVATE drv_rokid)
|
|
|
|
endif()
|
|
|
|
|
2020-04-29 23:11:43 +00:00
|
|
|
if(XRT_HAVE_V4L2)
|
2020-03-03 23:24:39 +00:00
|
|
|
target_link_libraries(target_lists PRIVATE drv_v4l2)
|
|
|
|
endif()
|
|
|
|
|
2021-02-01 19:04:39 +00:00
|
|
|
if(XRT_BUILD_DRIVER_VF)
|
2020-11-26 19:16:02 +00:00
|
|
|
target_link_libraries(target_lists PRIVATE drv_vf)
|
|
|
|
endif()
|
|
|
|
|
2020-04-29 23:11:43 +00:00
|
|
|
if(XRT_BUILD_DRIVER_VIVE)
|
2020-03-03 23:24:39 +00:00
|
|
|
target_link_libraries(target_lists PRIVATE drv_vive)
|
|
|
|
endif()
|
2020-04-11 10:09:24 +00:00
|
|
|
|
2020-04-29 23:11:43 +00:00
|
|
|
if(XRT_BUILD_DRIVER_SURVIVE)
|
2019-03-12 01:02:06 +00:00
|
|
|
target_link_libraries(target_lists PRIVATE drv_survive)
|
|
|
|
endif()
|
2020-04-11 10:09:24 +00:00
|
|
|
|
2023-06-14 00:12:26 +00:00
|
|
|
if(XRT_BUILD_DRIVER_STEAMVR_LIGHTHOUSE)
|
|
|
|
target_link_libraries(target_lists PRIVATE drv_steamvr_lh)
|
|
|
|
endif()
|
|
|
|
|
2020-10-23 08:28:50 +00:00
|
|
|
if(XRT_BUILD_DRIVER_ANDROID)
|
|
|
|
target_link_libraries(target_lists PRIVATE drv_android)
|
|
|
|
endif()
|
|
|
|
|
2020-12-29 23:44:57 +00:00
|
|
|
if(XRT_BUILD_DRIVER_ILLIXR)
|
|
|
|
target_link_libraries(target_lists PRIVATE drv_illixr)
|
|
|
|
endif()
|
|
|
|
|
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(target_lists PRIVATE drv_multi)
|
|
|
|
|
2021-03-11 14:25:00 +00:00
|
|
|
if(XRT_BUILD_DRIVER_QWERTY)
|
|
|
|
target_link_libraries(target_lists PRIVATE drv_qwerty)
|
|
|
|
endif()
|
|
|
|
|
2020-12-04 16:43:46 +00:00
|
|
|
if(XRT_BUILD_DRIVER_WMR)
|
|
|
|
target_link_libraries(target_lists PRIVATE drv_wmr)
|
|
|
|
endif()
|
|
|
|
|
2021-08-20 14:28:30 +00:00
|
|
|
if(XRT_BUILD_DRIVER_EUROC)
|
|
|
|
target_link_libraries(target_lists PRIVATE drv_euroc)
|
|
|
|
endif()
|
2020-12-04 16:43:46 +00:00
|
|
|
|
2022-09-12 04:26:39 +00:00
|
|
|
if(XRT_BUILD_DRIVER_SIMULAVR)
|
|
|
|
target_link_libraries(target_lists PRIVATE drv_svr)
|
|
|
|
endif()
|
|
|
|
|
2020-04-11 10:09:24 +00:00
|
|
|
####
|
|
|
|
# Instance
|
|
|
|
#
|
2022-09-20 00:09:05 +00:00
|
|
|
|
2023-03-03 20:42:33 +00:00
|
|
|
if(XRT_MODULE_COMPOSITOR_MAIN OR XRT_MODULE_COMPOSITOR_NULL)
|
2021-11-11 23:41:58 +00:00
|
|
|
add_library(target_instance STATIC target_instance.c)
|
|
|
|
target_link_libraries(
|
|
|
|
target_instance
|
|
|
|
PRIVATE
|
|
|
|
xrt-interfaces
|
|
|
|
aux_util
|
|
|
|
st_prober
|
|
|
|
target_lists
|
|
|
|
drv_includes
|
2020-05-27 21:09:32 +00:00
|
|
|
)
|
2021-11-11 23:41:58 +00:00
|
|
|
target_include_directories(target_instance PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
2022-05-20 10:13:58 +00:00
|
|
|
|
2023-03-03 20:42:33 +00:00
|
|
|
if(XRT_MODULE_COMPOSITOR_MAIN)
|
2022-05-20 10:13:58 +00:00
|
|
|
target_link_libraries(target_instance PRIVATE comp_main)
|
|
|
|
endif()
|
|
|
|
|
2023-03-03 20:42:33 +00:00
|
|
|
if(XRT_MODULE_COMPOSITOR_NULL)
|
2022-05-20 10:13:58 +00:00
|
|
|
target_link_libraries(target_instance PRIVATE comp_null)
|
|
|
|
endif()
|
2020-05-27 21:09:32 +00:00
|
|
|
endif()
|
|
|
|
|
|
|
|
####
|
|
|
|
# Instance without Compositor
|
|
|
|
#
|
2020-04-11 10:09:24 +00:00
|
|
|
|
2021-11-11 23:41:58 +00:00
|
|
|
add_library(target_instance_no_comp STATIC target_instance_no_comp.c)
|
|
|
|
target_link_libraries(
|
|
|
|
target_instance_no_comp
|
|
|
|
PRIVATE
|
|
|
|
xrt-interfaces
|
|
|
|
aux_util
|
|
|
|
st_prober
|
|
|
|
target_lists
|
|
|
|
drv_includes
|
2020-04-11 10:09:24 +00:00
|
|
|
)
|
2021-11-11 23:41:58 +00:00
|
|
|
target_include_directories(target_instance_no_comp PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|