diff --git a/classes/populate_sdk_qt6_base.bbclass b/classes/populate_sdk_qt6_base.bbclass index d66db42..af1e501 100644 --- a/classes/populate_sdk_qt6_base.bbclass +++ b/classes/populate_sdk_qt6_base.bbclass @@ -130,7 +130,12 @@ if(NOT DEFINED CMAKE_INSTALL_PREFIX) set(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT 1) endif() set(CMAKE_INSTALL_PREFIX "${prefix}" CACHE PATH "Install path prefix") -set(QT_BUILD_INTERNALS_NO_FORCE_SET_INSTALL_PREFIX ON CACHE BOOL "") + +# Include the toolchain configuration subscripts +file( GLOB toolchain_config_files "\${CMAKE_CURRENT_LIST_DIR}/OEToolchainConfig.cmake.d/*.cmake" ) +foreach(config \${toolchain_config_files}) + include(\${config}) +endforeach() EOF # resolve absolute paths at runtime 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 index 4e2e3e9..b5f3459 100644 --- 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 @@ -1,38 +1,17 @@ -From a1729a003f820289c403360d43f10b7f84c5a03c Mon Sep 17 00:00:00 2001 -From: Janne Juntunen -Date: Tue, 2 Aug 2022 11:03:08 +0300 -Subject: [PATCH] Fix qt toolchain for SDK use - -Set initial host path based on the location of the -QtConfigDependencies.cmake.in file. This helps us avoid need to relocate -the file in SDK. +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: I8d23f76e6e7abb2651b414661304ad58e5edd522 +Change-Id: I52aa2a10d2a13fd27d6bf8b4af6dc1833c7a286a +Upstream-Status: Inappropriate [embedded specific] --- - cmake/QtConfigDependencies.cmake.in | 6 ++++-- - cmake/qt.toolchain.cmake.in | 4 ++-- - 2 files changed, 6 insertions(+), 4 deletions(-) + cmake/qt.toolchain.cmake.in | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) -diff --git a/cmake/QtConfigDependencies.cmake.in b/cmake/QtConfigDependencies.cmake.in -index c17ae28bac..4cc804c27a 100644 ---- a/cmake/QtConfigDependencies.cmake.in -+++ b/cmake/QtConfigDependencies.cmake.in -@@ -1,8 +1,10 @@ - set(@INSTALL_CMAKE_NAMESPACE@_FOUND FALSE) - - set(__qt_platform_requires_host_info_package "@platform_requires_host_info_package@") --set(__qt_platform_initial_qt_host_path "@qt_host_path_absolute@") --set(__qt_platform_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_internal_setup_qt_host_path( - "${__qt_platform_requires_host_info_package}" diff --git a/cmake/qt.toolchain.cmake.in b/cmake/qt.toolchain.cmake.in index 15cf7a432e..03de9288df 100644 --- a/cmake/qt.toolchain.cmake.in diff --git a/recipes-qt/qt6/qtbase_git.bb b/recipes-qt/qt6/qtbase_git.bb index ffff5bd..dfb7e9e 100644 --- a/recipes-qt/qt6/qtbase_git.bb +++ b/recipes-qt/qt6/qtbase_git.bb @@ -162,8 +162,9 @@ do_install:append() { do_install:append:class-nativesdk() { install -d ${D}${datadir}/cmake/OEToolchainConfig.cmake.d + RELPATH=${@os.path.relpath(d.getVar('prefix'), d.getVar('datadir') + '/cmake/OEToolchainConfig.cmake.d')} cat > ${D}${datadir}/cmake/OEToolchainConfig.cmake.d/OEQt6Toolchain.cmake <