monado/tests/CMakeLists.txt
Ryan Pavlik cc4007a69e cmake: Substantial cleanups and simplifications
We now have a cmake-format config file.
We no longer use list variables for sources, instead using
target_sources when we need to add, in accordance with current
best practice. (This makes it a lot easier to edit too.) There's no more
include_directories(), add_definitions(), or other gently-deprecated
directory-scoped commands, nor any CMake scripts that include
a parent directory reference (named targets instead)
2021-11-12 09:48:37 -06:00

25 lines
907 B
CMake

# Copyright 2018-2021, Collabora, Ltd.
#
# SPDX-License-Identifier: BSL-1.0
# Catch2 main test driver
add_library(tests_main STATIC tests_main.cpp)
target_link_libraries(tests_main PUBLIC xrt-external-catch2)
if(ANDROID)
target_link_libraries(tests_main PUBLIC log)
endif()
# Input transform test
add_executable(tests_input_transform tests_input_transform.cpp)
target_link_libraries(tests_input_transform PRIVATE tests_main)
target_link_libraries(
tests_input_transform PRIVATE st_oxr xrt-interfaces xrt-external-openxr aux_util
)
add_test(NAME input_transform COMMAND tests_input_transform --success)
# Generic callbacks
add_executable(tests_generic_callbacks tests_generic_callbacks.cpp)
target_link_libraries(tests_generic_callbacks PRIVATE tests_main)
target_link_libraries(tests_generic_callbacks PRIVATE aux_util)
add_test(NAME tests_generic_callbacks COMMAND tests_generic_callbacks --success)