From bf3d834ab4ae3a60efb485a0645e402f58b63bbb Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Thu, 20 Aug 2020 12:09:33 +0200 Subject: [PATCH] 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 --- cmake/QtQmakeHelpers.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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}"