From c9651374486e49a7bce40ac7fefef1ec74b1c1cc Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Wed, 29 May 2019 16:05:52 +0200 Subject: [PATCH] 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 --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f0a8ef2a96..d70beff2e9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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)