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: Ibdd9138100cd303975c0aa27332d2a6c4d4f346b
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
Cristian Le 2025-06-20 11:34:25 +02:00
parent 4aaabfe8c2
commit c05094c758
1 changed files with 7 additions and 3 deletions

View File

@ -14,13 +14,17 @@ project(Qt3D # special case
) )
# special case begin # special case begin
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 find_package(Qt6 ${PROJECT_VERSION} QUIET CONFIG OPTIONAL_COMPONENTS
Network Concurrent Widgets Qml Quick ShaderTools Gamepad OpenGL Multimedia QuickWidgets) Network Concurrent Widgets Qml Quick ShaderTools Gamepad OpenGL Multimedia QuickWidgets)
# special case end # special case end
qt_internal_project_setup()
if(NOT TARGET Qt::Gui) if(NOT TARGET Qt::Gui)
message(NOTICE "Skipping the build as the condition \"TARGET Qt::Gui\" is not met.") message(NOTICE "Skipping the build as the condition \"TARGET Qt::Gui\" is not met.")
return() return()