summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCristian Le <[email protected]>2025-06-20 13:50:40 +0200
committerCristian Le <[email protected]>2025-06-20 15:40:15 +0200
commit72dff905a0a7c6e56be4851d823491e74d252563 (patch)
treee4235e126f88534a828e4daa9e2a0f78c63d171e
parentf14d32f52bfc260e3892968cb0731d6e8841d16c (diff)
Move `qt_internal_project_setup` as early as possibleHEADdev
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: I6820d671d4c7695546d4f3a0ea57a100f7635beb Reviewed-by: Alexandru Croitor <[email protected]>
-rw-r--r--CMakeLists.txt10
1 files changed, 8 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 55d88b2..6c4afdd 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -11,10 +11,16 @@ project(QtRemoteObjects
LANGUAGES CXX C
)
-find_package(Qt6 ${PROJECT_VERSION} CONFIG REQUIRED COMPONENTS BuildInternals Core Network)
-find_package(Qt6 ${PROJECT_VERSION} CONFIG OPTIONAL_COMPONENTS Gui Widgets Quick QuickTest Bluetooth WebSockets)
+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 Network)
+find_package(Qt6 ${PROJECT_VERSION} CONFIG OPTIONAL_COMPONENTS Gui Widgets Quick QuickTest Bluetooth
+ WebSockets)
+
if(NOT TARGET Qt::Network)
message(NOTICE "Skipping the build as the condition \"TARGET Qt::Network\" is not met.")
return()