60d804c567
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 2044992eed
Fixes: QTBUG-87735
Change-Id: I1b3d4cc122b3f502810d48e0443f39824016cab5
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
24 lines
1001 B
CMake
24 lines
1001 B
CMake
# Calls cmake --install ${QT_BUILD_DIR} --config <config> for each config
|
|
# with which Qt was built with.
|
|
# This is required to enable installation of all configurations of
|
|
# a Qt built with Ninja Multi-Config until the following issue is fixed.
|
|
# https://gitlab.kitware.com/cmake/cmake/-/issues/20713
|
|
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_arg})
|
|
execute_process(COMMAND ${args}
|
|
COMMAND_ECHO STDOUT
|
|
RESULT_VARIABLE result)
|
|
if(NOT "${result}" STREQUAL "0")
|
|
message(FATAL_ERROR "Installing configuration '${config}' failed with exit code: ${result}.")
|
|
endif()
|
|
endforeach()
|