diff options
author | Joerg Bornemann <joerg.bornemann@qt.io> | 2021-06-22 16:00:03 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-06-24 08:02:58 +0000 |
commit | 781b1f32f0f36006baa3f4b3ea64ceb1a4c9859a (patch) | |
tree | 6b1359920e0d428416de53cafe1c1f33879b1890 /cmake | |
parent | a93cf5835d87ecb7c850a494847f5bde863cae22 (diff) |
Fix QT_HOST_DATA for builds setting INSTALL_MKSPECSDIR
In a Qt build that was configured with INSTALL_MKSPECSDIR set to
something different than INSTALL_DATADIR, the qmake property
QT_HOST_DATA was wrong. Consequently, mkspecs could not be loaded,
rendering qmake dysfunctional.
The reason was that we considered every QT_HOST_xxx property to have the
same value as QT_INSTALL_xxx in a non-cross build.
This is not true for QT_HOST_DATA, because users might want to set
INSTALL_DATADIR to "foo" but INSTALL_MKSPECSDIR to "bar/mkspecs".
Move the unused determination of the host data dir to the QtLibraryInfo
lib and handle QT_HOST_DATA specially.
Fixes: QTBUG-94591
Change-Id: I2c44cda8405ff1d14391254fcd1d9b1361cb5855
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit d6e01ae05c3695aaf7d0d434718154b6ff151e32)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/QtQmakeHelpers.cmake | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/cmake/QtQmakeHelpers.cmake b/cmake/QtQmakeHelpers.cmake index 0a2c5b1531..47a41d9236 100644 --- a/cmake/QtQmakeHelpers.cmake +++ b/cmake/QtQmakeHelpers.cmake @@ -25,12 +25,6 @@ function(qt_generate_qconfig_cpp in_file out_file) set(QT_CONFIG_STR_OFFSETS "") set(QT_CONFIG_STRS "") - # Chop off the "/mkspecs" part of INSTALL_MKSPECSDIR - get_filename_component(hostdatadir "${INSTALL_MKSPECSDIR}" DIRECTORY) - if("${hostdatadir}" STREQUAL "") - set(hostdatadir ".") - endif() - # Start first part. qt_add_string_to_qconfig_cpp("${INSTALL_DOCDIR}") qt_add_string_to_qconfig_cpp("${INSTALL_INCLUDEDIR}") |