From e044c94a61f0cd2bdea1e89be4ec3c68007f7a5c Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Tue, 11 Jan 2022 17:44:10 +0100 Subject: CMake: Introduce QT_ADDITIONAL_HOST_PACKAGES_PREFIX_PATH When installing conan packages we have one installation prefix per package. When cross-building a conan package, we need to make known those multiple host prefixes to Qt, analogous to QT_ADDITIONAL_PACKAGES_PREFIX_PATH. Pick-to: 6.2 6.3 Fixes: QTBUG-94524 Change-Id: I68cbede350f95266a5fd3559e9b9c214c5858eed Reviewed-by: Alexandru Croitor --- cmake/qt.toolchain.cmake.in | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'cmake/qt.toolchain.cmake.in') diff --git a/cmake/qt.toolchain.cmake.in b/cmake/qt.toolchain.cmake.in index 23f322824d..1770969dbf 100644 --- a/cmake/qt.toolchain.cmake.in +++ b/cmake/qt.toolchain.cmake.in @@ -81,9 +81,14 @@ endif() # Handle packages located in QT_ADDITIONAL_PACKAGES_PREFIX_PATH when cross-compiling. Needed for # Conan. # We prepend to CMAKE_PREFIX_PATH so that a find_package(Qt6Foo) call works, without having to go -# through the Qt6 umbrella package. The paths must end in lib/cmake to esnsure the package is found. +# through the Qt6 umbrella package. The paths must end in lib/cmake to ensure the package is found. # See REROOT_PATH_ISSUE_MARKER. # We prepend to CMAKE_FIND_ROOT_PATH, due to the bug mentioned at REROOT_PATH_ISSUE_MARKER. +# +# Note that we don't handle QT_ADDITIONAL_HOST_PACKAGES_PREFIX_PATH here, because we would thwart +# our efforts to not accidentally pick up host packages. For now, we say that +# find_package(Qt6FooTools) is not supported, and people must use find_package(Qt6 COMPONENTS +# FooTools) instead. set(__qt_toolchain_additional_packages_prefixes "") if(QT_ADDITIONAL_PACKAGES_PREFIX_PATH) list(APPEND __qt_toolchain_additional_packages_prefixes -- cgit v1.2.3