monado/src/xrt/targets/common/CMakeLists.txt

141 lines
3 KiB
CMake
Raw Normal View History

# Copyright 2019-2021, Collabora, Ltd.
2019-04-30 13:33:34 +00:00
# SPDX-License-Identifier: BSL-1.0
####
# Lists
#
add_library(target_lists STATIC target_lists.c)
target_link_libraries(
target_lists
PRIVATE
xrt-interfaces
aux_util # TODO Remove this after removing #include "util/u_time.h" from xrt_defines.h
drv_includes
)
target_include_directories(target_lists PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
if(XRT_BUILD_DRIVER_ARDUINO)
target_link_libraries(target_lists PRIVATE drv_arduino)
endif()
if(XRT_BUILD_DRIVER_DAYDREAM)
2020-03-05 11:47:39 +00:00
target_link_libraries(target_lists PRIVATE drv_daydream)
endif()
if(XRT_BUILD_DRIVER_DUMMY)
target_link_libraries(target_lists PRIVATE drv_dummy)
endif()
if(XRT_BUILD_DRIVER_HDK)
target_link_libraries(target_lists PRIVATE drv_hdk)
endif()
if(XRT_BUILD_DRIVER_HYDRA)
target_link_libraries(target_lists PRIVATE drv_hydra)
endif()
if(XRT_BUILD_DRIVER_NS)
target_link_libraries(target_lists PRIVATE drv_ns)
endif()
if(XRT_BUILD_DRIVER_ULV2)
target_link_libraries(target_lists PRIVATE drv_ulv2)
endif()
if(XRT_BUILD_DRIVER_OHMD)
target_link_libraries(target_lists PRIVATE drv_ohmd)
endif()
if(XRT_BUILD_DRIVER_HANDTRACKING)
target_link_libraries(target_lists PRIVATE drv_ht)
endif()
if(XRT_BUILD_DRIVER_PSMV)
target_link_libraries(target_lists PRIVATE drv_psmv)
endif()
if(XRT_BUILD_DRIVER_PSVR)
target_link_libraries(target_lists PRIVATE drv_psvr)
endif()
if(XRT_BUILD_DRIVER_RS)
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()
if(XRT_HAVE_V4L2)
target_link_libraries(target_lists PRIVATE drv_v4l2)
endif()
if(XRT_BUILD_DRIVER_VF)
2020-11-26 19:16:02 +00:00
target_link_libraries(target_lists PRIVATE drv_vf)
endif()
if(XRT_BUILD_DRIVER_VIVE)
target_link_libraries(target_lists PRIVATE drv_vive)
endif()
if(XRT_BUILD_DRIVER_SURVIVE)
2019-03-12 01:02:06 +00:00
target_link_libraries(target_lists PRIVATE drv_survive)
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()
target_link_libraries(target_lists PRIVATE drv_multi)
if(XRT_BUILD_DRIVER_QWERTY)
target_link_libraries(target_lists PRIVATE drv_qwerty)
endif()
if(XRT_BUILD_DRIVER_WMR)
target_link_libraries(target_lists PRIVATE drv_wmr)
endif()
if(XRT_BUILD_DRIVER_EUROC)
target_link_libraries(target_lists PRIVATE drv_euroc)
endif()
####
# Instance
#
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
drv_includes
)
target_include_directories(target_instance PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
endif()
####
# Instance without Compositor
#
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
)
target_include_directories(target_instance_no_comp PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})