2020-05-15 09:38:53 +00:00
|
|
|
# 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
|
2021-03-24 08:38:59 +00:00
|
|
|
# a Qt built with Ninja Multi-Config until the following issues are fixed:
|
2020-05-15 09:38:53 +00:00
|
|
|
# https://gitlab.kitware.com/cmake/cmake/-/issues/20713
|
2021-03-24 08:38:59 +00:00
|
|
|
# https://gitlab.kitware.com/cmake/cmake/-/issues/21475
|
2020-05-15 09:38:53 +00:00
|
|
|
set(configs "@__qt_configured_configs@")
|
2023-10-16 16:04:06 +00:00
|
|
|
set(should_skip_strip "@__qt_skip_strip_installed_artifacts@")
|
|
|
|
|
2020-05-15 09:38:53 +00:00
|
|
|
if(NOT QT_BUILD_DIR)
|
|
|
|
message(FATAL_ERROR "No QT_BUILD_DIR value provided to qt-cmake-private-install.")
|
|
|
|
endif()
|
2023-10-16 16:04:06 +00:00
|
|
|
|
|
|
|
if(should_skip_strip)
|
|
|
|
unset(strip_arg)
|
|
|
|
else()
|
|
|
|
set(strip_arg --strip)
|
2020-10-28 18:35:11 +00:00
|
|
|
endif()
|
2023-10-16 16:04:06 +00:00
|
|
|
|
2020-05-15 09:38:53 +00:00
|
|
|
foreach(config ${configs})
|
|
|
|
message(STATUS "Installing configuration: '${config}'")
|
2020-10-28 18:35:11 +00:00
|
|
|
set(args "${CMAKE_COMMAND}" --install ${QT_BUILD_DIR} --config "${config}" ${strip_arg})
|
2020-05-15 09:38:53 +00:00
|
|
|
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()
|