From 6508ebd3b87a8a1b8cc7846864074e29fe0f63f1 Mon Sep 17 00:00:00 2001 From: Boris Pek Date: Thu, 28 Jun 2018 21:55:41 +0300 Subject: [PATCH] Make build of test application optional --- CMakeLists.txt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9518385..3e7dedf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,6 +18,7 @@ include(ECMSetupVersion) include(ECMGeneratePriFile) option(BUILD_WITH_QT4 "Build qtkeychain with Qt4 no matter if Qt5 was found" OFF) +option(BUILD_TEST_APPLICATION "Build test application" ON) option(BUILD_TRANSLATIONS "Build translations" ON) option(QTKEYCHAIN_STATIC "Build static library" OFF) @@ -225,8 +226,10 @@ install(TARGETS ${QTKEYCHAIN_TARGET_NAME} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ) -add_executable( testclient testclient.cpp ) -target_link_libraries( testclient ${QTKEYCHAIN_TARGET_NAME}) +if(BUILD_TEST_APPLICATION) + add_executable( testclient testclient.cpp ) + target_link_libraries( testclient ${QTKEYCHAIN_TARGET_NAME}) +endif() ###