summaryrefslogtreecommitdiffstats
path: root/cmake/QtFindPackageHelpers.cmake
diff options
context:
space:
mode:
authorAlexey Edelev <alexey.edelev@qt.io>2023-02-14 14:52:04 +0100
committerAlexey Edelev <alexey.edelev@qt.io>2023-02-15 15:12:12 +0100
commit545400addd7935c87ec79596ac3010b4f9016a84 (patch)
tree69c12bcdc71f38aa84373b36df037abce442e657 /cmake/QtFindPackageHelpers.cmake
parentb34bea5e96370986ea5dfc499fc2ec6366fda627 (diff)
Add the NO_CMAKE_PACKAGE_REGISTRY option forwarding to qt_find_package
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 Pick-to: 6.5 Change-Id: I97ce1755b2f8e3413f1b0276fe26568b2f5efe33 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'cmake/QtFindPackageHelpers.cmake')
-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)