summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2020-08-20 12:09:33 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2020-08-23 11:04:07 +0200
commitbf3d834ab4ae3a60efb485a0645e402f58b63bbb (patch)
tree8e7711eb96f0fa156ed409ded5bb795541657673
parent5138a970f316203043c3ce3566719674431c757b (diff)
CMake: Fix creation of host-qmake wrapper when cross-compiling
The -host prefix was added to the 'preliminary' directory rather than the actual wrapper shell script. This caused it to be overwritten every time by the cross-compiled qmake binary. Change-Id: I103811c6aa9181fa701e3e7ecaf828ecdd1e3c90 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
-rw-r--r--cmake/QtQmakeHelpers.cmake3
1 files changed, 2 insertions, 1 deletions
diff --git a/cmake/QtQmakeHelpers.cmake b/cmake/QtQmakeHelpers.cmake
index cee57b2ed2..a75fc6f13a 100644
--- a/cmake/QtQmakeHelpers.cmake
+++ b/cmake/QtQmakeHelpers.cmake
@@ -159,7 +159,7 @@ HostSpec=${QT_QMAKE_HOST_MKSPEC}
file(GENERATE OUTPUT "${qt_conf_path}" CONTENT "${content}")
qt_path_join(qmake_wrapper_in_file "${CMAKE_CURRENT_SOURCE_DIR}/bin/qmake-wrapper-for-target")
- qt_path_join(qmake_wrapper "preliminary" "qmake")
+ set(qmake_wrapper "qmake")
if(QT_BUILD_TOOLS_WHEN_CROSSCOMPILING)
# Avoid collisions with the cross-compiled qmake binary.
string(PREPEND qmake_wrapper "host-")
@@ -171,6 +171,7 @@ HostSpec=${QT_QMAKE_HOST_MKSPEC}
string(APPEND qmake_wrapper_in_file ".in")
set(host_qt_bindir "${host_prefix}/${QT${PROJECT_VERSION_MAJOR}_HOST_INFO_BINDIR}")
+ qt_path_join(qmake_wrapper "preliminary" "${qmake_wrapper}")
configure_file("${qmake_wrapper_in_file}" "${qmake_wrapper}" @ONLY)
qt_install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${qt_conf_path}"