summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rw-r--r--bin/qt-cmake-private-install.cmake.in19
1 files changed, 19 insertions, 0 deletions
diff --git a/bin/qt-cmake-private-install.cmake.in b/bin/qt-cmake-private-install.cmake.in
new file mode 100644
index 0000000000..bc9895791b
--- /dev/null
+++ b/bin/qt-cmake-private-install.cmake.in
@@ -0,0 +1,19 @@
+# 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}")
+ 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()