summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexey Edelev <alexey.edelev@qt.io>2023-02-14 14:52:04 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2023-02-15 17:34:30 +0000
commit3715cc356153bd8bc384ce4badfe6baece3d3768 (patch)
tree0e661c51c9d9be992757232183ee5af8abf693dc
parente2d1c5d139272164a583ce7d2f1d23164b36180c (diff)
Add the NO_CMAKE_PACKAGE_REGISTRY option forwarding to qt_find_packagev6.5.0-beta3
Allow forwarding the NO_CMAKE_PACKAGE_REGISTRY option to the find_package call from qt_find_package. When we look for host tool packages the package dependencies are recorded in the cmake package registry. This leads to the situation when the lookup retry will use the package that is already found in host path instead of looking the right one in target paths. Adding the 'NO_CMAKE_PACKAGE_REGISTRY' to the qt_find_package calls suppresses records in cmake package registry and starts a clean search using target paths. Task-number: QTBUG-111140 Change-Id: I97ce1755b2f8e3413f1b0276fe26568b2f5efe33 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit 545400addd7935c87ec79596ac3010b4f9016a84) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--cmake/QtFindPackageHelpers.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmake/QtFindPackageHelpers.cmake b/cmake/QtFindPackageHelpers.cmake
index 407e41b833..4dc2643939 100644
--- a/cmake/QtFindPackageHelpers.cmake
+++ b/cmake/QtFindPackageHelpers.cmake
@@ -18,7 +18,7 @@ endfunction()
macro(qt_find_package)
# Get the target names we expect to be provided by the package.
- set(find_package_options CONFIG NO_MODULE MODULE REQUIRED)
+ set(find_package_options CONFIG NO_MODULE MODULE REQUIRED NO_CMAKE_PACKAGE_REGISTRY)
set(options ${find_package_options} MARK_OPTIONAL)
set(oneValueArgs MODULE_NAME QMAKE_LIB)
set(multiValueArgs PROVIDED_TARGETS COMPONENTS OPTIONAL_COMPONENTS)