From ba75a6c6a0231f93fd40480992beec46b0f64885 Mon Sep 17 00:00:00 2001 From: Volker Krause Date: Sun, 30 Jul 2017 15:47:29 +0200 Subject: 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 --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'CMakeLists.txt') 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) -- cgit v1.2.1