From f714766518a47b68f17a890a260ddec56c037ab8 Mon Sep 17 00:00:00 2001 From: Alex Richardson Date: Mon, 13 Jan 2014 17:31:38 +0100 Subject: Make Qt5Test an optional dependency It is only needed for building the autotests --- autotests/CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'autotests') diff --git a/autotests/CMakeLists.txt b/autotests/CMakeLists.txt index e4790f69..18317ee8 100644 --- a/autotests/CMakeLists.txt +++ b/autotests/CMakeLists.txt @@ -3,7 +3,12 @@ remove_definitions(-DQT_NO_CAST_FROM_ASCII) include(ECMMarkAsTest) -find_package(Qt5 5.2.0 CONFIG REQUIRED Concurrent Test Widgets) +find_package(Qt5Test ${QT_REQUIRED_VERSION} CONFIG QUIET) + +if(NOT Qt5Test_FOUND) + message(STATUS "Qt5Test not found, autotests will not be built.") + return() +endif() macro(KCONFIGCORE_UNIT_TESTS) foreach(_testname ${ARGN}) -- cgit v1.2.1