2044992eed
To avoid big artifact sizes, strip the binaries and libraries upon installation. This achieves stripping similar to QTBUG-69767 and QTBUG-81301 but arguably in a cleaner CMake way. See comment on PS34 of the unmerged commit 90b09fee44b08b65a436fd15fda2526e242f7b21 for details. Task-number: QTBUG-86053 Change-Id: I3ed929a8a7c74b88c480543212fc9551d8bde77f Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
20 lines
918 B
CMake
20 lines
918 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()
|
|
foreach(config ${configs})
|
|
message(STATUS "Installing configuration: '${config}'")
|
|
set(args "${CMAKE_COMMAND}" --install ${QT_BUILD_DIR} --config "${config}" --strip)
|
|
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()
|