From 00e5bb89ddd977a5900185a610ee89b7bbe6eb2a Mon Sep 17 00:00:00 2001 From: Elias Steurer Date: Sun, 26 Sep 2021 16:50:49 +0200 Subject: [PATCH] Fix building tests only if enabled --- ScreenPlay/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ScreenPlay/CMakeLists.txt b/ScreenPlay/CMakeLists.txt index 8fd91997..de57b90e 100644 --- a/ScreenPlay/CMakeLists.txt +++ b/ScreenPlay/CMakeLists.txt @@ -114,8 +114,10 @@ target_link_libraries( Qt${QT_VERSION_MAJOR}::Svg Qt5::WebEngine) -add_executable(tst_ScreenPlay tests/tst_main.cpp) +if(${TESTS_ENABLED}) + add_executable(tst_ScreenPlay tests/tst_main.cpp) target_link_libraries(tst_ScreenPlay PRIVATE ScreenPlayLib Qt5::Test) +endif() add_executable(${PROJECT_NAME} main.cpp) target_link_libraries(${PROJECT_NAME} PRIVATE ScreenPlayLib)