summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorOliver Wolff <oliver.wolff@qt.io>2021-01-19 15:20:46 +0100
committerOliver Wolff <oliver.wolff@qt.io>2021-01-25 09:48:06 +0100
commit257d073d030a322ecae6f8e50c29c8c3841ab03d (patch)
tree4beb24ad0e89eb18581d4c67f1fe64e8ddfbe6b1 /CMakeLists.txt
parente331662e128404f81231d7322f808a89a0cdca91 (diff)
Fix toplevel CMakeLists.txt
Configurations without parts of Qt should not error out, but exit the cmake call gracefully. Change-Id: Iabfa7541681afd5c7354be1c2070e6c24b858eea Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt10
1 files changed, 6 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 654fd4d..7d76639 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -15,11 +15,13 @@ if (NOT WIN32)
return()
endif()
-find_package(Qt6 ${PROJECT_VERSION} CONFIG REQUIRED COMPONENTS BuildInternals Core Gui Widgets PrintSupport) # special case
-find_package(Qt6 ${PROJECT_VERSION} CONFIG OPTIONAL_COMPONENTS Qml Quick) # special case
+find_package(Qt6 ${PROJECT_VERSION} CONFIG REQUIRED COMPONENTS BuildInternals Core) # special case
+find_package(Qt6 ${PROJECT_VERSION} CONFIG OPTIONAL_COMPONENTS Qml Quick Gui Widgets PrintSupport) # special case
-if(NOT TARGET Qt::Widgets)
- message(NOTICE "Skipping the build as the condition \"TARGET Qt::Widgets\" is not met.")
+if(NOT TARGET Qt::Gui OR NOT TARGET Qt::Widgets OR NOT TARGET Qt::PrintSupport)
+ message(NOTICE "Skipping the build as the condition \"TARGET Qt::Gui\", \"TARGET Qt::Widget\" "
+ "or \"TARGET Qt::Printsupport\" is not met.")
return()
endif()
+
qt_build_repo()