summaryrefslogtreecommitdiffstats
path: root/cmake/QtSetup.cmake
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2020-06-30 20:59:07 +0200
committerJoerg Bornemann <joerg.bornemann@qt.io>2020-07-01 17:47:58 +0200
commit389c772fd4a04933d95904e88470506a44535f92 (patch)
tree5aecf233c8be752dfee0df4d541657e5b2e88cd6 /cmake/QtSetup.cmake
parentfecfa0a01460a6c37b77f7d23849a53d83045baf (diff)
CMake: Fix qconfig.cpp for cross-builds
This patch modifies the two preprocessor definitions QT_CONFIGURE_HOSTBINDIR_TO_HOSTPREFIX_PATH and QT_CONFIGURE_HOSTBINDIR_TO_EXTPREFIX_PATH which are exclusively used by qmake (and not QtCore's QLibraryInfo) to determine the ext prefix and the host prefix. In the qmake build of Qt, qmake considers the host prefix as "location where qmake is installed". This is usually the same as the ext prefix but can be modified by the user at configure time. In the CMake build, we don't build tools for the host but always for the target platform. The QT_HOST_PATH is an external prefix we never install to. That means, the qmake we build is always installed into the ext prefix (CMAKE_STAGING_PREFIX or CMAKE_INSTALL_PREFIX). Therefore, we can calculate the path of <ext_prefix>/bin relative to <ext_prefix> and use this value for both, QT_CONFIGURE_HOSTBINDIR_TO_HOSTPREFIX_PATH and QT_CONFIGURE_HOSTBINDIR_TO_EXTPREFIX_PATH. The "path of <ext_prefix>/bin relative to <ext_prefix>" is equivalent to just the "path <prefix>/bin relative to <prefix>", meaning we can safely use <prefix>, which is just CMAKE_INSTALL_PREFIX. Task-number: QTBUG-84886 Change-Id: Ie1d4628a7049ddfd0d0a56dfe4ee2f2bb4952277 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'cmake/QtSetup.cmake')
0 files changed, 0 insertions, 0 deletions