diff options
author | Joerg Bornemann <joerg.bornemann@qt.io> | 2022-09-26 11:21:02 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2022-09-28 13:19:11 +0000 |
commit | e609a00aae06f7334198858317ae3437b8891d9b (patch) | |
tree | 20325188dc00386b23235318da8c1f6964ceab2d /cmake | |
parent | 1437422bd21580deafd7211ec28c8a14883e260d (diff) |
CMake: Fix HostData qmake property for cross builds
The target_qt.conf file contained a wrong HostData value if the
effective data dirs were set to paths of different levels in the host
and target Qt builds. Fix this by computing the relative path from the
mkspec dir's parent to the ext prefix' data dir.
Note that qmake's HostData dir is the root directory of the mkspecs
directory.
Task-number: QTBUG-106712
Change-Id: Id8c9de925f5ff51901677b7218621747169a5cec
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit ea92137e7624d4abd544d79be8faf99471bfd87b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/QtQmakeHelpers.cmake | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cmake/QtQmakeHelpers.cmake b/cmake/QtQmakeHelpers.cmake index 1ad05d7a80..e10ea2cdd8 100644 --- a/cmake/QtQmakeHelpers.cmake +++ b/cmake/QtQmakeHelpers.cmake @@ -95,7 +95,8 @@ function(qt_generate_qmake_and_qtpaths_wrapper_for_target) "${host_prefix}") file(RELATIVE_PATH ext_prefix_relative_to_conf_file "${ext_prefix}/${INSTALL_BINDIR}" "${ext_prefix}") - file(RELATIVE_PATH ext_prefix_relative_to_host_prefix "${host_prefix}" "${ext_prefix}") + file(RELATIVE_PATH ext_datadir_relative_to_host_prefix "${host_prefix}" + "${ext_prefix}/${INSTALL_MKSPECSDIR}/..") set(content "") @@ -127,7 +128,7 @@ Prefix=${prefix} "[Paths] Prefix=${ext_prefix_relative_to_conf_file} HostPrefix=${host_prefix_relative_to_conf_file} -HostData=${ext_prefix_relative_to_host_prefix} +HostData=${ext_datadir_relative_to_host_prefix} Sysroot=${sysroot} SysrootifyPrefix=${sysrootify_prefix} TargetSpec=${QT_QMAKE_TARGET_MKSPEC} |