diff options
author | Cristian Adam <cristian.adam@qt.io> | 2020-10-28 19:35:11 +0100 |
---|---|---|
committer | Cristian Adam <cristian.adam@qt.io> | 2020-10-29 11:24:46 +0100 |
commit | 60d804c56769de82e658205bec687b83833a61e9 (patch) | |
tree | b9e3e4e18dfaf21caec1f914443e49747e93de19 /bin | |
parent | ec4079160a7d518efa26000efce01126b7f595f7 (diff) |
Do not strip binaries for MSVC builds
CMake's --install --strip command will result in calling ${CMAKE_STRIP}
after installation.
On the build machines we have multiple compilers, and ${CMAKE_STRIP} will
have a valid program e.g. C:/strawberry/c/bin/strip.exe
This will change the MSVC binaries to have a MinGW linker version flag,
which confuses Qt Creator when setting up a MSVC Kit.
Amends 2044992eed3e48909d17a4304ea25d3007d94d60
Fixes: QTBUG-87735
Change-Id: I1b3d4cc122b3f502810d48e0443f39824016cab5
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'bin')
-rw-r--r-- | bin/qt-cmake-private-install.cmake.in | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/bin/qt-cmake-private-install.cmake.in b/bin/qt-cmake-private-install.cmake.in index 6d6f3f0f0e..845394d02e 100644 --- a/bin/qt-cmake-private-install.cmake.in +++ b/bin/qt-cmake-private-install.cmake.in @@ -7,9 +7,13 @@ set(configs "@__qt_configured_configs@") if(NOT QT_BUILD_DIR) message(FATAL_ERROR "No QT_BUILD_DIR value provided to qt-cmake-private-install.") endif() +unset(strip_arg) +if ("x@MSVC@" STREQUAL "x") + set(strip_arg --strip) +endif() foreach(config ${configs}) message(STATUS "Installing configuration: '${config}'") - set(args "${CMAKE_COMMAND}" --install ${QT_BUILD_DIR} --config "${config}" --strip) + set(args "${CMAKE_COMMAND}" --install ${QT_BUILD_DIR} --config "${config}" ${strip_arg}) execute_process(COMMAND ${args} COMMAND_ECHO STDOUT RESULT_VARIABLE result) |