summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2022-09-21 17:57:30 +0200
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2022-09-26 22:25:11 +0200
commit6634b152b61a39f455be4d6fdcc173d8c9574eb8 (patch)
treef909152a5ca783b736e302c8f915e6e5b0310f90 /CMakeLists.txt
parent64906d7dcba7702e7a36acfb5984410f7d91ac24 (diff)
downloadqtlocation-6634b152b61a39f455be4d6fdcc173d8c9574eb8.tar.gz
Build system: fix requirements
ShaderTools are strictly speaking required as well, but we might be able to make them optional if the RHI based item implementations get moved out. Change-Id: I3daa5ebbc8218f85fc18f608b94667de14601096 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt22
1 files changed, 5 insertions, 17 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5f8e7360..2c186a19 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -27,23 +27,11 @@ endif()
# Need to search for positioning only after we make sure that it's not WASM.
# Otherwise we'll get an "QtPositioning not found" error in WASM build.
-find_package(Qt6 ${PROJECT_VERSION} CONFIG REQUIRED COMPONENTS Positioning Network) # special case
-find_package(Qt6 ${PROJECT_VERSION} QUIET CONFIG OPTIONAL_COMPONENTS Quick Qml Test QuickTest PositioningQuick ShaderTools) # special case
-find_package(Qt6 ${PROJECT_VERSION} CONFIG OPTIONAL_COMPONENTS
- # Needed when building examples in-tree
- Widgets
- Sql
+find_package(Qt6 ${PROJECT_VERSION} CONFIG REQUIRED COMPONENTS
+ Qml Quick Network Test QuickTest Positioning PositioningQuick
+)
+find_package(Qt6 ${PROJECT_VERSION} QUIET CONFIG OPTIONAL_COMPONENTS
+ ShaderTools
)
-
-macro(assertTargets)
- foreach(qtTarget IN ITEMS ${ARGN})
- if(NOT TARGET Qt::${qtTarget})
- message(NOTICE "Skipping the build as the condition \"TARGET Qt::${qtTarget}\" is not met.")
- return()
- endif()
- endforeach()
-endmacro()
-
-assertTargets(Quick PositioningQuick ShaderTools)
qt_build_repo()