From a4d3698a56665cc73a18fa860c862e1b04533792 Mon Sep 17 00:00:00 2001 From: Samuli Piippo Date: Thu, 16 Dec 2021 13:10:48 +0200 Subject: [PATCH] Fix qt.toolchain.cmake for SDK use The calculated paths for QT_TOOLCHAIN_RELOCATABLE paths point to host sysroot which must not be used when cross-compiling other projects. Change-Id: I52aa2a10d2a13fd27d6bf8b4af6dc1833c7a286a Upstream-Status: Inappropriate [embedded specific] --- cmake/qt.toolchain.cmake.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/qt.toolchain.cmake.in b/cmake/qt.toolchain.cmake.in index 15cf7a432e..03de9288df 100644 --- a/cmake/qt.toolchain.cmake.in +++ b/cmake/qt.toolchain.cmake.in @@ -67,8 +67,8 @@ get_filename_component(QT_TOOLCHAIN_RELOCATABLE_CMAKE_DIR "${CMAKE_CURRENT_LIST_ # Instead of collapsing the search prefix (which is the case when one is a subdir of the other), # it concatenates them creating an invalid path. Workaround it by setting the root path to the # Qt install prefix, and the prefix path to the lib/cmake subdir. -list(PREPEND CMAKE_PREFIX_PATH "${QT_TOOLCHAIN_RELOCATABLE_CMAKE_DIR}") -list(PREPEND CMAKE_FIND_ROOT_PATH "${QT_TOOLCHAIN_RELOCATABLE_INSTALL_PREFIX}") +#list(PREPEND CMAKE_PREFIX_PATH "${QT_TOOLCHAIN_RELOCATABLE_CMAKE_DIR}") +#list(PREPEND CMAKE_FIND_ROOT_PATH "${QT_TOOLCHAIN_RELOCATABLE_INSTALL_PREFIX}") # Let CMake load our custom platform modules. # CMake-provided platform modules take precedence.