diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2022-07-18 14:14:41 +0200 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2022-07-25 19:52:22 +0200 |
commit | 7b24ffa936880619f54c8cc1a459a0328238657c (patch) | |
tree | 1b1a2b8f6d9c7e84d1ab9b4d4a0ca7298f84b783 /cmake/QtBuild.cmake | |
parent | a41bef8edeffe7b77970968533793a587215d977 (diff) |
CMake: Improve Qt6HostInfo package lookup condition
Instead of checking if QT_HOST_PATH is set during user project
configuration to find out if Qt6HostInfo should be looked up,
record if QT_HOST_PATH was provided during Qt configuration
into Qt6Dependencies.cmake and look up the package in a user
project based on that information.
This improves handling of the case where cmake is directly used
to configure a Qt project (instead of qt-cmake), which means no
QT_HOST_PATH might be set by the user, and then cmake would error out
saying that e.g. Qt6CoreTools is not found, instead of saying that
Qt6HostInfo is not found.
Pick-to: 6.4
Task-number: QTBUG-104998
Change-Id: I0377d5440e4b5b295af73cfd4b5188f61d48e440
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Diffstat (limited to 'cmake/QtBuild.cmake')
-rw-r--r-- | cmake/QtBuild.cmake | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cmake/QtBuild.cmake b/cmake/QtBuild.cmake index d3d41dbd07..4b7cc643bb 100644 --- a/cmake/QtBuild.cmake +++ b/cmake/QtBuild.cmake @@ -558,7 +558,8 @@ if(CMAKE_CROSSCOMPILING) endif() endif() -_qt_internal_find_host_info_package() +_qt_internal_determine_if_host_info_package_needed(__qt_build_requires_host_info_package) +_qt_internal_find_host_info_package("${__qt_build_requires_host_info_package}") # TODO: This block provides support for old variables. It should be removed once # we remove all references to these variables in other Qt module repos. |