diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index ff19b12..eb3c7eb 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -1,21 +1,18 @@ -project(tests) +SET(PROJECT_TEST ${PROJECT_NAME}-test ) -set(SOURCES - Tests.cpp - UtilitiesTest.cpp - GroupPlotUITest.cpp - QuantilesTest.cpp -) +include_directories(${CMAKE_SOURCE_DIR}) -set(HEADERS +set(${PROJECT_TEST}_SOURCES + Tests.cpp UtilitiesTest.h + UtilitiesTest.cpp GroupPlotUITest.h + GroupPlotUITest.cpp QuantilesTest.h + QuantilesTest.cpp ) -add_executable(tests ${SOURCES} ${HEADERS}) - -target_link_libraries(tests PRIVATE qwtble Qt6::Test Qt6::Widgets) - -add_test(NAME tests COMMAND tests) +add_executable(${PROJECT_TEST} ${${PROJECT_TEST}_SOURCES}) +target_link_libraries(${PROJECT_TEST} PRIVATE qwtble Qt6::Test Qt6::Widgets) +add_test(NAME ${PROJECT_TEST} COMMAND ${PROJECT_TEST})