summaryrefslogtreecommitdiffstats
path: root/cmake/QtBuildInformation.cmake
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2021-08-10 10:17:35 +0200
committerJoerg Bornemann <joerg.bornemann@qt.io>2021-08-17 19:18:54 +0200
commit153fd84c8a686dc0483a2e830683ef012c9a3156 (patch)
treeed3e82328c6f7d8cb5c4b7129c3ac19728717b73 /cmake/QtBuildInformation.cmake
parent4ccbd751f1eee5c27ce5d4c9868d65092630d991 (diff)
CMake: Suggest "ninja install" for multi-config builds
The configure summary now suggests "ninja install" for Ninja Multi-Config builds, because "cmake --install ." does not install all configurations. See CMake upstream issue #21475. Pick-to: 6.2 Change-Id: Ie3129a906945db9d09c6772ce66ec7239797b8fc Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'cmake/QtBuildInformation.cmake')
-rw-r--r--cmake/QtBuildInformation.cmake7
1 files changed, 7 insertions, 0 deletions
diff --git a/cmake/QtBuildInformation.cmake b/cmake/QtBuildInformation.cmake
index 6828cbba8e..9077fb9285 100644
--- a/cmake/QtBuildInformation.cmake
+++ b/cmake/QtBuildInformation.cmake
@@ -20,6 +20,13 @@ function(qt_print_build_instructions)
set(build_command "cmake --build . --parallel")
set(install_command "cmake --install .")
+
+ # Suggest "ninja install" for Multi-Config builds
+ # until https://gitlab.kitware.com/cmake/cmake/-/issues/21475 is fixed.
+ if(CMAKE_GENERATOR STREQUAL "Ninja Multi-Config")
+ set(install_command "ninja install")
+ endif()
+
set(configure_module_command "qt-configure-module")
if(CMAKE_HOST_WIN32)
string(APPEND configure_module_command ".bat")