CMake: Fix qt-configure-module location in configure's output

For non-cross-builds, qt-configure-module is located in
CMAKE_INSTALL_PREFIX/bin, not below the staging prefix.

Fixes: QTBUG-88262
Change-Id: Ib6cdd88ece391d5b8ce850b991564e5bed1e475d
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
Joerg Bornemann 2020-11-09 10:53:52 +01:00
parent 47bcc4dd4b
commit 4ea99db8f3

View File

@ -24,6 +24,11 @@ function(qt_print_build_instructions)
if(CMAKE_HOST_WIN32) if(CMAKE_HOST_WIN32)
string(APPEND configure_module_command ".bat") string(APPEND configure_module_command ".bat")
endif() endif()
if("${CMAKE_STAGING_PREFIX}" STREQUAL "")
set(local_install_prefix "${CMAKE_INSTALL_PREFIX}")
else()
set(local_install_prefix "${CMAKE_STAGING_PREFIX}")
endif()
message("Qt is now configured for building. Just run '${build_command}'\n") message("Qt is now configured for building. Just run '${build_command}'\n")
if(QT_WILL_INSTALL) if(QT_WILL_INSTALL)
@ -34,7 +39,7 @@ function(qt_print_build_instructions)
message("Note that this build cannot be deployed to other machines or devices.") message("Note that this build cannot be deployed to other machines or devices.")
endif() endif()
message("\nTo configure and build other Qt modules, you can use the following convenience script: message("\nTo configure and build other Qt modules, you can use the following convenience script:
${QT_STAGING_PREFIX}/${INSTALL_BINDIR}/${configure_module_command}") ${local_install_prefix}/${INSTALL_BINDIR}/${configure_module_command}")
message("\nIf reconfiguration fails for some reason, try to remove 'CMakeCache.txt' \ message("\nIf reconfiguration fails for some reason, try to remove 'CMakeCache.txt' \
from the build directory \n") from the build directory \n")
endfunction() endfunction()