aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2020-11-10 09:47:28 +0100
committerAlexandru Croitor <alexandru.croitor@qt.io>2020-11-10 14:44:58 +0100
commitfb7d710ad002b9e48e0a46f2e33338cc578aa16c (patch)
tree827185b6584318c6ac2975653b4ae8f97880905b /CMakeLists.txt
parentdcfe085ba5ff6ea82f67c4fb39e08aeb7abd1ec9 (diff)
CMake: Make Gui and some other packages optional
This allows a no-error configuration of a -no-gui Qt build. This results in skipping building qtquickcontrols2 when Gui / Quick are not available. qmake does the same. Task-number: QTBUG-88343 Change-Id: I074f62e4491278ec93f1c6225923111b5eadf2ec Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt4
1 files changed, 2 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1a2f4203..46cb3278 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -15,8 +15,8 @@ project(QtQuickControls2
set(QT_NO_INTERNAL_COMPATIBILITY_FUNCTIONS TRUE)
# special case end
-find_package(Qt6 ${PROJECT_VERSION} CONFIG REQUIRED COMPONENTS BuildInternals Core Gui Network Qml Quick) # special case
-find_package(Qt6 ${PROJECT_VERSION} QUIET CONFIG OPTIONAL_COMPONENTS Widgets QuickTest) # special case
+find_package(Qt6 ${PROJECT_VERSION} CONFIG REQUIRED COMPONENTS BuildInternals Core Qml) # special case
+find_package(Qt6 ${PROJECT_VERSION} QUIET CONFIG OPTIONAL_COMPONENTS Gui Network Quick Widgets QuickTest) # special case
if(NOT TARGET Qt::Quick)
message(NOTICE "Skipping the build as the condition \"TARGET Qt::Quick\" is not met.")
return()