From 33f884275cc11331203ef9ca0a32b4b4717abafb Mon Sep 17 00:00:00 2001 From: Cristian Le Date: Fri, 28 Mar 2025 17:28:28 +0100 Subject: [PATCH] Move `qt_internal_project_setup` as early as possible 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: Icfb9bbdf1d94a4938c8ea4c43241768ccbf89c18 Reviewed-by: Alexandru Croitor --- CMakeLists.txt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ca9339b38..0e760a945 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,7 +13,13 @@ project(QtDoc # special case LANGUAGES CXX C ) -find_package(Qt6 ${PROJECT_VERSION} CONFIG REQUIRED COMPONENTS BuildInternals Core) +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 COMPONENTS Core) find_package(Qt6 ${PROJECT_VERSION} QUIET CONFIG OPTIONAL_COMPONENTS Gui @@ -42,7 +48,6 @@ find_package(Qt6 ${PROJECT_VERSION} QUIET CONFIG ExamplesAssetDownloaderPrivate Linguist ) -qt_internal_project_setup() qt_build_repo_begin() qt_build_repo_impl_find_package_tests()