From 7e315ef53a9574ee1760b653a6b326d60e5bd15b Mon Sep 17 00:00:00 2001 From: Michael Palimaka Date: Sat, 11 Jan 2014 20:03:54 +1100 Subject: Improve dependency specifications. QtTest and QtConcurrent are only required for autotests, so no need to find them unconditionally. QtWidgets is not actually used - QtGui is instead. REVIEW: 114962 --- CMakeLists.txt | 2 +- autotests/CMakeLists.txt | 6 ++++++ src/gui/CMakeLists.txt | 4 ++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b794b4b3..db0c7cc1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,7 +7,7 @@ set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR}) set(QT_REQUIRED_VERSION 5.2.0) -find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED Widgets Xml Test Concurrent) +find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED Gui Xml) include(KDEInstallDirs) include(KDEFrameworkCompilerSettings) include(KDECMakeSettings) diff --git a/autotests/CMakeLists.txt b/autotests/CMakeLists.txt index 18317ee8..93745a99 100644 --- a/autotests/CMakeLists.txt +++ b/autotests/CMakeLists.txt @@ -4,12 +4,18 @@ remove_definitions(-DQT_NO_CAST_FROM_ASCII) include(ECMMarkAsTest) find_package(Qt5Test ${QT_REQUIRED_VERSION} CONFIG QUIET) +find_package(Qt5Concurrent ${QT_REQUIRED_VERSION} CONFIG QUIET) if(NOT Qt5Test_FOUND) message(STATUS "Qt5Test not found, autotests will not be built.") return() endif() +if(NOT Qt5Concurrent_FOUND) + message(STATUS "Qt5Concurrent not found, autotests will not be built.") + return() +endif() + macro(KCONFIGCORE_UNIT_TESTS) foreach(_testname ${ARGN}) add_executable(${_testname} ${_testname}.cpp) # TODO NOGUI diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt index e6ef7468..fc2ace47 100644 --- a/src/gui/CMakeLists.txt +++ b/src/gui/CMakeLists.txt @@ -1,6 +1,6 @@ -find_package(Qt5Widgets 5.2.0 REQUIRED NO_MODULE) -find_package(Qt5Xml 5.2.0 REQUIRED NO_MODULE) +find_package(Qt5Gui ${QT_REQUIRED_VERSION} REQUIRED NO_MODULE) +find_package(Qt5Xml ${QT_REQUIRED_VERSION} REQUIRED NO_MODULE) set(libkconfiggui_SRCS kconfiggui.cpp -- cgit v1.2.1