2020-03-03 23:24:39 +00:00
|
|
|
# Copyright 2019-2020, 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
|
|
|
|
#
|
|
|
|
|
|
|
|
add_library(target_lists STATIC
|
2019-04-30 13:33:34 +00:00
|
|
|
target_lists.c
|
|
|
|
)
|
2020-04-11 10:09:24 +00:00
|
|
|
target_link_libraries(target_lists PRIVATE
|
|
|
|
xrt-interfaces
|
2020-05-12 16:51:41 +00:00
|
|
|
aux_util # TODO Remove this after removing #include "util/u_time.h" from xrt_defines.h
|
2020-04-11 10:09:24 +00:00
|
|
|
)
|
|
|
|
target_include_directories(target_lists PRIVATE
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../../drivers
|
|
|
|
)
|
|
|
|
target_include_directories(target_lists PUBLIC
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}
|
|
|
|
)
|
2020-03-03 23:24:39 +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()
|
|
|
|
|
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()
|
|
|
|
|
2020-04-29 23:11:43 +00:00
|
|
|
if(XRT_BUILD_DRIVER_DUMMY)
|
2020-03-03 23:24:39 +00:00
|
|
|
target_link_libraries(target_lists PRIVATE drv_dummy)
|
|
|
|
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()
|
|
|
|
|
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()
|
|
|
|
|
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()
|
|
|
|
|
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()
|
|
|
|
|
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()
|
|
|
|
|
2020-04-29 23:11:43 +00:00
|
|
|
if(XRT_BUILD_DRIVER_RS)
|
2020-03-03 23:24:39 +00:00
|
|
|
target_link_libraries(target_lists PRIVATE drv_rs)
|
|
|
|
endif()
|
|
|
|
|
2020-10-13 17:18:33 +00:00
|
|
|
if(XRT_BUILD_DRIVER_REMOTE)
|
|
|
|
target_link_libraries(target_lists PRIVATE drv_remote)
|
|
|
|
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
|
|
|
|
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-04-11 10:09:24 +00:00
|
|
|
####
|
|
|
|
# Instance
|
|
|
|
#
|
2020-05-27 21:09:32 +00:00
|
|
|
if(XRT_FEATURE_COMPOSITOR_MAIN)
|
|
|
|
add_library(target_instance STATIC
|
|
|
|
target_instance.c
|
|
|
|
)
|
|
|
|
target_link_libraries(target_instance PRIVATE
|
|
|
|
xrt-interfaces
|
|
|
|
aux_util
|
|
|
|
st_prober
|
|
|
|
target_lists
|
|
|
|
comp_main
|
|
|
|
)
|
|
|
|
target_include_directories(target_instance PRIVATE
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../../drivers
|
|
|
|
)
|
|
|
|
target_include_directories(target_instance PUBLIC
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
####
|
|
|
|
# Instance without Compositor
|
|
|
|
#
|
2020-04-11 10:09:24 +00:00
|
|
|
|
2020-05-27 21:09:32 +00:00
|
|
|
add_library(target_instance_no_comp STATIC
|
|
|
|
target_instance_no_comp.c
|
2020-04-11 10:09:24 +00:00
|
|
|
)
|
2020-05-27 21:09:32 +00:00
|
|
|
target_link_libraries(target_instance_no_comp PRIVATE
|
2020-04-11 10:09:24 +00:00
|
|
|
xrt-interfaces
|
|
|
|
aux_util
|
2020-05-26 21:46:11 +00:00
|
|
|
st_prober
|
|
|
|
target_lists
|
2020-04-11 10:09:24 +00:00
|
|
|
)
|
2020-05-27 21:09:32 +00:00
|
|
|
target_include_directories(target_instance_no_comp PRIVATE
|
2020-04-11 10:09:24 +00:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../../drivers
|
|
|
|
)
|
2020-05-27 21:09:32 +00:00
|
|
|
target_include_directories(target_instance_no_comp PUBLIC
|
2020-04-11 10:09:24 +00:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}
|
|
|
|
)
|