diff options
author | Cristian Le <[email protected]> | 2025-03-28 16:55:06 +0100 |
---|---|---|
committer | Cristian Le <[email protected]> | 2025-05-30 15:22:10 +0200 |
commit | 3188a4f4c7b6f617bd047b666d262cbd4bd3e6ac (patch) | |
tree | 056939651560c657840b51c58519336794594e07 | |
parent | 110d01fa88036fb2185844d97f1e44dcf18daf38 (diff) |
The earliest we can move this is right after `BuildInternals`. This
allows us to add function calls before navigating the `find_package`
tree of the dependents.
Task-number: QTBUG-135233
Change-Id: Id89784cc47780b240f83146309963ba441521b2d
Reviewed-by: Alexandru Croitor <[email protected]>
-rw-r--r-- | CMakeLists.txt | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index b19aa76d4..047e0f088 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,10 +13,15 @@ project(QtMultimedia LANGUAGES CXX C ) -find_package(Qt6 ${PROJECT_VERSION} CONFIG REQUIRED COMPONENTS BuildInternals Core) -find_package(Qt6 ${PROJECT_VERSION} QUIET CONFIG OPTIONAL_COMPONENTS Gui Network Svg Widgets Quick Qml Test QuickTest QuickControls2 Quick3D OpenGLPrivate) +find_package(Qt6 ${PROJECT_VERSION} CONFIG REQUIRED COMPONENTS BuildInternals) + +# This should be called as early as possible, just after find_package(BuildInternals) where it is +# defined. qt_internal_project_setup() +find_package(Qt6 ${PROJECT_VERSION} CONFIG REQUIRED Core) +find_package(Qt6 ${PROJECT_VERSION} QUIET CONFIG OPTIONAL_COMPONENTS Gui Network Svg Widgets Quick Qml Test QuickTest QuickControls2 Quick3D OpenGLPrivate) + if(NOT TARGET Qt::Gui) message(NOTICE "Skipping the build as the condition \"TARGET Qt::Gui\" is not met.") return() |