summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <andreas.sturmlechner@gmail.com>2015-02-12 19:07:04 (GMT)
committerAndreas Sturmlechner <andreas.sturmlechner@gmail.com>2015-02-18 23:11:47 (GMT)
commit4aacbc05c1f7c8f171b3e4ce76f54073f969264c (patch)
tree91c0ea18971e8d0f397bbc9f54581131a1349a2a
parentbe53b333e6405cbcd34ef2b8d99debe88bfe8f1d (diff)
Make tests optional
REVIEW: 122547
-rw-r--r--CMakeLists.txt8
1 files changed, 6 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9fa06d4..67ffc32 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -12,7 +12,7 @@ include(FeatureSummary)
include(GenerateExportHeader)
include(ECMSetupVersion)
-find_package(Qt5 REQUIRED COMPONENTS Network Widgets Test)
+find_package(Qt5 REQUIRED COMPONENTS Network Widgets)
find_package(KF5 REQUIRED COMPONENTS Config DocTools Codecs I18n KIO WidgetsAddons)
ecm_setup_version(${KF5_VERSION}
@@ -36,10 +36,14 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config-musicbrainz.h.cmake ${CMAKE_CU
include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
-add_subdirectory( test )
add_subdirectory( kcmcddb )
add_subdirectory( libkcddb )
+if(BUILD_TESTING)
+ find_package(Qt5Test REQUIRED)
+ add_subdirectory( test )
+endif()
+
feature_summary(WHAT PACKAGES_NOT_FOUND FATAL_ON_MISSING_REQUIRED_PACKAGES)
# Figure out the relative path from the installed Config.cmake file to the install prefix (which may be at