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.
|
|
|
|
|
2019-06-18 18:26:23 +00:00
|
|
|
|
|
|
|
# Set up these two lists for use across multiple targets.
|
|
|
|
set(DRIVER_OBJECTS)
|
|
|
|
set(DRIVER_LIBRARIES)
|
|
|
|
|
|
|
|
if(BUILD_DRIVER_HDK)
|
2019-06-26 15:52:27 +00:00
|
|
|
set(XRT_BUILD_HDK TRUE)
|
2019-06-18 18:26:23 +00:00
|
|
|
list(APPEND DRIVER_OBJECTS $<TARGET_OBJECTS:drv_hdk>)
|
|
|
|
list(APPEND DRIVER_LIBRARIES ${HIDAPI_LIBRARIES})
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(BUILD_DRIVER_OHMD)
|
2019-06-26 15:52:27 +00:00
|
|
|
set(XRT_BUILD_OHMD TRUE)
|
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-26 15:52:27 +00:00
|
|
|
set(XRT_BUILD_PSMV TRUE)
|
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-26 15:52:27 +00:00
|
|
|
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})
|
2019-06-18 18:26:23 +00:00
|
|
|
endif()
|
|
|
|
|
2019-06-26 15:52:27 +00:00
|
|
|
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)
|
2019-06-26 11:21:13 +00:00
|
|
|
add_subdirectory(cli)
|