Fix build against sysroots

Toolchain files from sysroots (such as Yocto or Android) typically set
the CMAKE_FIND_ROOT_PATH_MODE_PACKAGE to ONLY to ensure that no external
packages are accidentally found. Similar to how we discover the Qt tools
packages for cross-compiling, we need to temporarily change the mode to
BOTH to locate our build internals.

Change-Id: Ib4374ee4a974379213218b7ec430637857ed02e7
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
bb10
Simon Hausmann 2019-05-29 16:05:52 +02:00
parent c9c5ca9997
commit c965137448
1 changed files with 1 additions and 1 deletions

View File

@ -18,7 +18,7 @@ list(APPEND CMAKE_MODULE_PATH
list(APPEND CMAKE_PREFIX_PATH
"${CMAKE_CURRENT_SOURCE_DIR}/cmake"
)
find_package(QtBuildInternals)
find_package(QtBuildInternals CMAKE_FIND_ROOT_PATH_BOTH)
qt_build_repo_begin(SKIP_CMAKE_MODULE_PATH_ADDITION)