2020-01-25 14:36:31 +00:00
|
|
|
# Copyright 2019-2020, Collabora, Ltd.
|
2019-03-18 05:52:32 +00:00
|
|
|
# SPDX-License-Identifier: BSL-1.0
|
|
|
|
|
|
|
|
######
|
|
|
|
# This is where we collect all of the pieces from the different parts of
|
|
|
|
# the source tree and build a complete driver or integration part.
|
|
|
|
|
2019-06-18 18:26:23 +00:00
|
|
|
|
|
|
|
# Set up these two lists for use across multiple targets.
|
|
|
|
|
2019-10-15 18:52:19 +00:00
|
|
|
list(APPEND DRIVER_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
|
|
|
|
|
2019-06-28 16:49:24 +00:00
|
|
|
if(BUILD_WITH_LIBUSB)
|
|
|
|
list(APPEND DRIVER_LIBRARIES ${LIBUSB1_LIBRARIES})
|
|
|
|
endif()
|
|
|
|
|
2020-03-02 22:28:07 +00:00
|
|
|
if(BUILD_WITH_LIBUVC)
|
|
|
|
list(APPEND DRIVER_LIBRARIES ${LIBUVC_LIBRARIES})
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(BUILD_WITH_LIBUDEV)
|
|
|
|
list(APPEND DRIVER_LIBRARIES ${UDEV_LIBRARIES})
|
|
|
|
endif()
|
|
|
|
|
2019-07-23 12:38:58 +00:00
|
|
|
if(BUILD_WITH_JPEG)
|
|
|
|
list(APPEND DRIVER_LIBRARIES ${JPEG_LIBRARIES})
|
|
|
|
endif()
|
|
|
|
|
2020-01-25 14:36:31 +00:00
|
|
|
if(BUILD_DRIVER_DUMMY)
|
|
|
|
list(APPEND DRIVER_OBJECTS $<TARGET_OBJECTS:drv_dummy>)
|
|
|
|
endif()
|
|
|
|
|
2019-06-18 18:26:23 +00:00
|
|
|
if(BUILD_DRIVER_HDK)
|
|
|
|
list(APPEND DRIVER_OBJECTS $<TARGET_OBJECTS:drv_hdk>)
|
|
|
|
list(APPEND DRIVER_LIBRARIES ${HIDAPI_LIBRARIES})
|
|
|
|
endif()
|
|
|
|
|
2019-06-19 21:50:55 +00:00
|
|
|
if(BUILD_DRIVER_HYDRA)
|
|
|
|
list(APPEND DRIVER_OBJECTS $<TARGET_OBJECTS:drv_hydra>)
|
|
|
|
endif()
|
|
|
|
|
2020-01-24 21:35:12 +00:00
|
|
|
if(BUILD_DRIVER_NS)
|
|
|
|
list(APPEND DRIVER_OBJECTS $<TARGET_OBJECTS:drv_ns>)
|
|
|
|
endif()
|
|
|
|
|
2019-06-18 18:26:23 +00:00
|
|
|
if(BUILD_DRIVER_OHMD)
|
2019-06-19 11:10:12 +00:00
|
|
|
list(APPEND DRIVER_OBJECTS $<TARGET_OBJECTS:drv_ohmd>)
|
2019-06-18 18:26:23 +00:00
|
|
|
list(APPEND DRIVER_LIBRARIES OpenHMD::OpenHMD)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(BUILD_DRIVER_PSMV)
|
2019-06-19 11:10:12 +00:00
|
|
|
list(APPEND DRIVER_OBJECTS $<TARGET_OBJECTS:drv_psmv>)
|
2019-06-18 18:26:23 +00:00
|
|
|
endif()
|
|
|
|
|
|
|
|
if(BUILD_DRIVER_PSVR)
|
2019-06-19 11:10:12 +00:00
|
|
|
list(APPEND DRIVER_OBJECTS $<TARGET_OBJECTS:drv_psvr>)
|
|
|
|
list(APPEND DRIVER_LIBRARIES ${HIDAPI_LIBRARIES})
|
2019-06-18 18:26:23 +00:00
|
|
|
endif()
|
|
|
|
|
2020-02-09 15:36:16 +00:00
|
|
|
if(BUILD_DRIVER_RS)
|
|
|
|
list(APPEND DRIVER_OBJECTS $<TARGET_OBJECTS:drv_rs>)
|
|
|
|
list(APPEND DRIVER_LIBRARIES ${realsense2_LIBRARY})
|
|
|
|
endif()
|
|
|
|
|
2019-07-22 18:21:04 +00:00
|
|
|
if(BUILD_DRIVER_V4L2)
|
|
|
|
list(APPEND DRIVER_OBJECTS $<TARGET_OBJECTS:drv_v4l2>)
|
|
|
|
endif()
|
|
|
|
|
2019-10-02 11:00:52 +00:00
|
|
|
if(BUILD_DRIVER_VIVE)
|
|
|
|
list(APPEND DRIVER_OBJECTS $<TARGET_OBJECTS:drv_vive>)
|
|
|
|
list(APPEND DRIVER_LIBRARIES ${ZLIB_LIBRARIES})
|
|
|
|
endif()
|
|
|
|
|
2019-12-03 21:48:36 +00:00
|
|
|
list(APPEND DRIVER_OBJECTS $<TARGET_OBJECTS:aux_tracking>)
|
2019-10-02 11:00:52 +00:00
|
|
|
|
2019-09-09 20:56:58 +00:00
|
|
|
if(BUILD_TRACKING)
|
|
|
|
list(APPEND DRIVER_LIBRARIES ${OpenCV_LIBRARIES})
|
|
|
|
endif()
|
|
|
|
|
2019-04-30 13:33:34 +00:00
|
|
|
add_subdirectory(common)
|
2020-03-02 22:18:26 +00:00
|
|
|
if(BUILD_TARGET_OPENXR)
|
|
|
|
add_subdirectory(openxr)
|
|
|
|
endif()
|
2019-06-26 11:21:13 +00:00
|
|
|
add_subdirectory(cli)
|
2019-07-21 14:45:50 +00:00
|
|
|
|
|
|
|
if(BUILD_TARGET_GUI)
|
|
|
|
add_subdirectory(gui)
|
|
|
|
endif()
|