From a549dfa3e392d719caf8c3fd7c1927e9092e9396 Mon Sep 17 00:00:00 2001 From: Cristian Le Date: Fri, 20 Jun 2025 12:13:33 +0200 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: Iddf80afb89bf208e8a59f7eb13459d1c81606f6c Reviewed-by: Alexandru Croitor --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index a77d1bc6..0532554d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,6 +12,11 @@ project(QtGraphs ) 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 OPTIONAL_COMPONENTS Core Quick Gui Widgets QuickTest QuickWidgets Test Quick3D QuickShapesPrivate PrintSupport) macro(assertTargets)