Move the look up of Protobuf/GRPC host tools before QtQuick

QtQuick triggers the plugin dependency lookup in static builds. These
dependencies such as GRPC might trigger the tool package look up too.
We need to make sure that tools are found explicitly using the exact
paths we expect those tools are located in.

Change-Id: Ib0be380938c1a07e996d83668b175b1b2cdc64c3
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 8e157f1c5d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Alexey Edelev 2023-07-26 13:09:02 +02:00 committed by Qt Cherry-pick Bot
parent bfa3852bc0
commit 4ba50c4e6c
1 changed files with 4 additions and 4 deletions

View File

@ -12,16 +12,16 @@ project(QtGrpc
)
find_package(Qt6 ${PROJECT_VERSION} CONFIG REQUIRED COMPONENTS BuildInternals Core)
find_package(Qt6 ${PROJECT_VERSION} CONFIG OPTIONAL_COMPONENTS Network Gui Widgets Quick
QuickControls2)
qt_internal_project_setup()
# Try to find Qt6::qtprotobufgen and Qt6::qtgrpcgen targets from host tools
# when cross-compiling.
if(NOT "${QT_HOST_PATH}" STREQUAL "")
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/src/tools/host")
endif()
find_package(Qt6 ${PROJECT_VERSION} CONFIG OPTIONAL_COMPONENTS Network Gui Widgets Quick
QuickControls2)
qt_internal_project_setup()
include("${CMAKE_CURRENT_LIST_DIR}/src/tools/qtprotobufgen/Qt6ProtobufToolsMacros.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/src/tools/qtgrpcgen/Qt6GrpcToolsMacros.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/src/protobuf/Qt6ProtobufBuildInternals.cmake")