1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-11-25 12:13:00 +01:00

Fix building tests only if enabled

This commit is contained in:
Elias Steurer 2021-09-26 16:50:49 +02:00
parent 34ae1c3123
commit 00e5bb89dd

View File

@ -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)