monado/src/xrt/targets/CMakeLists.txt

50 lines
1.3 KiB
CMake
Raw Normal View History

2019-03-18 05:52:32 +00:00
# Copyright 2019, Collabora, Ltd.
# 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.
# Set up these two lists for use across multiple targets.
set(DRIVER_OBJECTS)
set(DRIVER_LIBRARIES)
2019-06-28 16:49:24 +00:00
if(BUILD_WITH_LIBUSB)
list(APPEND DRIVER_LIBRARIES ${LIBUSB1_LIBRARIES})
endif()
2019-07-23 12:38:58 +00:00
if(BUILD_WITH_JPEG)
list(APPEND DRIVER_LIBRARIES ${JPEG_LIBRARIES})
endif()
if(BUILD_DRIVER_HDK)
set(XRT_BUILD_HDK TRUE)
list(APPEND DRIVER_OBJECTS $<TARGET_OBJECTS:drv_hdk>)
list(APPEND DRIVER_LIBRARIES ${HIDAPI_LIBRARIES})
endif()
if(BUILD_DRIVER_OHMD)
set(XRT_BUILD_OHMD TRUE)
2019-06-19 11:10:12 +00:00
list(APPEND DRIVER_OBJECTS $<TARGET_OBJECTS:drv_ohmd>)
list(APPEND DRIVER_LIBRARIES OpenHMD::OpenHMD)
endif()
if(BUILD_DRIVER_PSMV)
set(XRT_BUILD_PSMV TRUE)
2019-06-19 11:10:12 +00:00
list(APPEND DRIVER_OBJECTS $<TARGET_OBJECTS:drv_psmv>)
endif()
if(BUILD_DRIVER_PSVR)
set(XRT_BUILD_PSVR TRUE)
2019-06-19 11:10:12 +00:00
list(APPEND DRIVER_OBJECTS $<TARGET_OBJECTS:drv_psvr>)
list(APPEND DRIVER_LIBRARIES ${HIDAPI_LIBRARIES})
endif()
configure_file(targets_enabled_drivers.h.cmake_in ${CMAKE_CURRENT_BINARY_DIR}/targets_enabled_drivers.h)
include_directories(${CMAKE_CURRENT_BINARY_DIR})
2019-04-30 13:33:34 +00:00
add_subdirectory(common)
2019-03-18 05:52:32 +00:00
add_subdirectory(openxr)
add_subdirectory(cli)