diff options
Diffstat (limited to 'recipes-qt/qt6/qtbase/0004-Fix-qt.toolchain.cmake-for-SDK-use.patch')
-rw-r--r-- | recipes-qt/qt6/qtbase/0004-Fix-qt.toolchain.cmake-for-SDK-use.patch | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/recipes-qt/qt6/qtbase/0004-Fix-qt.toolchain.cmake-for-SDK-use.patch b/recipes-qt/qt6/qtbase/0004-Fix-qt.toolchain.cmake-for-SDK-use.patch new file mode 100644 index 0000000..81caf15 --- /dev/null +++ b/recipes-qt/qt6/qtbase/0004-Fix-qt.toolchain.cmake-for-SDK-use.patch @@ -0,0 +1,47 @@ +From e3f59a24add346248842a8f28971621469c9161f Mon Sep 17 00:00:00 2001 +From: Samuli Piippo <samuli.piippo@qt.io> +Date: Thu, 16 Dec 2021 13:10:48 +0200 +Subject: [PATCH] Fix qt.toolchain.cmake for SDK use + +Set initial host path based on the location of the qt.toolchain.cmake file. +This helps us avoid need to relocate the file in SDK. + +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 | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/cmake/qt.toolchain.cmake.in b/cmake/qt.toolchain.cmake.in +index c565e923ff..a917c65d89 100644 +--- a/cmake/qt.toolchain.cmake.in ++++ b/cmake/qt.toolchain.cmake.in +@@ -70,8 +70,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. +@@ -156,10 +156,10 @@ endif() + # Set up QT_HOST_PATH and do sanity checks. + # A host path is required when cross-compiling but optional when doing a native build. + set(__qt_toolchain_host_path_required "@qt_host_path_required@") +-set(__qt_toolchain_initial_qt_host_path +- "@qt_host_path_absolute@") +-set(__qt_toolchain_initial_qt_host_path_cmake_dir +- "@qt_host_path_cmake_dir_absolute@") ++get_filename_component(__qt_toolchain_initial_qt_host_path ++ "${CMAKE_CURRENT_LIST_DIR}/../../.." ABSOLUTE) ++get_filename_component(__qt_toolchain_initial_qt_host_path_cmake_dir ++ "${CMAKE_CURRENT_LIST_DIR}/../../../lib/cmake" ABSOLUTE) + + # QT_HOST_PATH precedence: + # - cache variable / command line option |