aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorVolker Krause <vkrause@kde.org>2017-07-30 15:47:29 +0200
committerVolker Krause <vkrause@kde.org>2017-08-04 18:54:42 +0200
commitba75a6c6a0231f93fd40480992beec46b0f64885 (patch)
tree9fad6c863da42093d50c8534e3eef969d290b200 /CMakeLists.txt
parent48e2e7c9bcd24cc010a6af0a455f8793ea863d40 (diff)
downloadkconfig-ba75a6c6a0231f93fd40480992beec46b0f64885.tar.gz
kconfig-ba75a6c6a0231f93fd40480992beec46b0f64885.tar.bz2
Allow to build KConfig without Qt5Gui
Summary: This is particularly useful for cross-compilation, where we only need the kconfig_compiler on the host system. Reviewers: #frameworks, apol, aacid Reviewed By: aacid Subscribers: aacid Tags: #frameworks Differential Revision: https://phabricator.kde.org/D6994
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt6
1 files changed, 5 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5e50ba5c..1f7df844 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -12,7 +12,11 @@ set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})
set(REQUIRED_QT_VERSION 5.6.0)
-find_package(Qt5 ${REQUIRED_QT_VERSION} CONFIG REQUIRED Gui Xml)
+find_package(Qt5 ${REQUIRED_QT_VERSION} CONFIG REQUIRED Xml)
+option(KCONFIG_USE_GUI "Build components using Qt5Gui" ON)
+if(KCONFIG_USE_GUI)
+ find_package(Qt5 ${REQUIRED_QT_VERSION} CONFIG REQUIRED Gui)
+endif()
include(KDEInstallDirs)
include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE)
include(KDECMakeSettings)