| 1 |
message(STATUS "Building with tests.") |
| 2 |
|
| 3 |
file(GLOB copyq_tests_SOURCES tests/*.cpp) |
| 4 |
add_executable(copyq-tests |
| 5 |
${copyq_tests_SOURCES} |
| 6 |
$<TARGET_OBJECTS:copyq-common> |
| 7 |
${MINIAUDIO_OBJECTS} |
| 8 |
) |
| 9 |
set_target_properties(copyq-tests PROPERTIES COMPILE_DEFINITIONS "${copyq_DEFINITIONS}") |
| 10 |
|
| 11 |
find_package(${copyq_qt}Test REQUIRED) |
| 12 |
target_link_libraries(copyq-tests ${copyq_LIBRARIES} ${copyq_qt}::Test) |
| 13 |
target_include_directories(copyq-tests PRIVATE .) |
| 14 |
|
| 15 |
set(copyq_pkg itemtests) |
| 16 |
set(copyq_plugin_SOURCES |
| 17 |
tests/itemtests/itemtests.cpp |
| 18 |
item/itemwidget.cpp |
| 19 |
) |
| 20 |
add_library(${copyq_pkg} MODULE ${copyq_plugin_SOURCES}) |
| 21 |
target_link_libraries(${copyq_pkg} ${copyq_qt}::Widgets ${copyq_qt}::Test) |
| 22 |
target_include_directories(${copyq_pkg} PRIVATE .) |