summaryrefslogtreecommitdiffstats
path: root/cmake/QtPluginDependencies.cmake.in
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2019-09-19 13:46:37 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2019-09-21 13:10:37 +0000
commitffe088941378e32ea30c142cca7e63c537a41ff1 (patch)
treee51291904597f8edf32610ea3e15779721af3204 /cmake/QtPluginDependencies.cmake.in
parentf771b8f6b14418508c110e1e0dcd31b903424fca (diff)
Fix examples find_package calls to work in prefix builds
To build examples as part of a non-installed Qt prefix build, not-yet-installed Config files need to be found by find_package() calls inside example projects. Facilitate that by propagating the CMAKE_PREFIX_PATH and QT_EXAMPLES_CMAKE_PREFIX_PATH paths in all relevant find_package() calls where NO_DEFAULT_PATH is used. Also adjust the inclusion of the QtFeature.cmake file to be relative to the qt6 directory, rather than the current list directory. This is needed to successfully find the file when parsing a Config file from a non-installed build directory. Change-Id: I36031279628f1f7741d8f4d7571484a6545227f7 Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'cmake/QtPluginDependencies.cmake.in')
-rw-r--r--cmake/QtPluginDependencies.cmake.in2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmake/QtPluginDependencies.cmake.in b/cmake/QtPluginDependencies.cmake.in
index 6ca392ec64..0dd6ba5a08 100644
--- a/cmake/QtPluginDependencies.cmake.in
+++ b/cmake/QtPluginDependencies.cmake.in
@@ -43,7 +43,7 @@ foreach(_target_dep ${_target_deps})
if (NOT ${pkg}_FOUND)
find_dependency(${pkg} ${version}
- PATHS "${CMAKE_CURRENT_LIST_DIR}/.." NO_DEFAULT_PATH
+ PATHS "${CMAKE_CURRENT_LIST_DIR}/.." ${QT_EXAMPLES_CMAKE_PREFIX_PATH} NO_DEFAULT_PATH
)
endif()