Tests/FindLibinput/Test/CMakeLists.txt
raw| 1 | cmake_minimum_required(VERSION 3.10) |
| 2 | project(TestFindLibinput C) |
| 3 | include(CTest) |
| 4 | |
| 5 | find_package(Libinput REQUIRED) |
| 6 | |
| 7 | add_executable(test_tgt main.c) |
| 8 | target_link_libraries(test_tgt Libinput::Libinput) |
| 9 | add_test(NAME test_tgt COMMAND test_tgt) |
| 10 | |
| 11 | add_executable(test_var main.c) |
| 12 | target_include_directories(test_var PRIVATE ${Libinput_INCLUDE_DIRS}) |
| 13 | target_link_libraries(test_var PRIVATE ${Libinput_LIBRARIES}) |
| 14 | add_test(NAME test_var COMMAND test_var) |