diff options
author | Cristian Le <[email protected]> | 2025-03-28 17:07:52 +0100 |
---|---|---|
committer | Cristian Le <[email protected]> | 2025-05-30 12:29:32 +0200 |
commit | 5f1ed8da0eca3d2faeff6cde4da031b61f231dee (patch) | |
tree | dbfb0b0ded9fcce4fedab6beff8167b29bdd860e | |
parent | 36910557000f286ebf943f1adef21a678ba53da1 (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: I6a875982fa6d8b15dcfacfda5e4d5976d02798d6
Reviewed-by: Alexandru Croitor <[email protected]>
Reviewed-by: Joerg Bornemann <[email protected]>
-rw-r--r-- | CMakeLists.txt | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 073d55c8..a2b7fa3a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,7 +13,14 @@ project(QtGrpc set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS TRUE) -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 Core) + # Try to find Qt6::qtprotobufgen and Qt6::qtgrpcgen targets from host tools # when cross-compiling. if(NOT "${QT_HOST_PATH}" STREQUAL "") @@ -22,7 +29,6 @@ endif() find_package(Qt6 ${PROJECT_VERSION} CONFIG OPTIONAL_COMPONENTS Network Gui Widgets Quick QmlNetwork QuickControls2 QuickTest) -qt_internal_project_setup() include("${CMAKE_CURRENT_LIST_DIR}/src/tools/qtprotobufgen/Qt6ProtobufToolsMacros.cmake") include("${CMAKE_CURRENT_LIST_DIR}/src/tools/qtgrpcgen/Qt6GrpcToolsMacros.cmake") |