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>
This commit is contained in:
Joerg Bornemann 2021-08-10 10:17:35 +02:00
parent 4ccbd751f1
commit 153fd84c8a

View File

@ -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")