diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2019-09-17 16:05:50 +0200 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2019-09-17 17:13:38 +0000 |
commit | a0e3c1b39997ce09c2f0f7bceb41e1b341edf490 (patch) | |
tree | a8f4e337bdfa57dbf8d2456df612bb67ffa2c3df /cmake/QtBuildInternals | |
parent | 08aba5ea0ab4196779c79a4e8d8ba6d510b14e12 (diff) |
Print build instructions when configuring qtbase
This is similar to how we show the instructions when configuring
in qmake land.
Change-Id: Iabd28acc3d74fd0175eab812a412744dac89e6f6
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'cmake/QtBuildInternals')
-rw-r--r-- | cmake/QtBuildInternals/QtBuildInternalsConfig.cmake | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake b/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake index c7c6f757a4..a898d118c6 100644 --- a/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake +++ b/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake @@ -75,8 +75,33 @@ macro(qt_build_repo_end) OPTIONAL_PACKAGES_NOT_FOUND RUNTIME_PACKAGES_NOT_FOUND FATAL_ON_MISSING_REQUIRED_PACKAGES) + + qt_print_build_instructions() endmacro() +function(qt_print_build_instructions) + if(NOT PROJECT_NAME STREQUAL "QtBase") + return() + endif() + + set(build_command "cmake --build . --parallel") + set(install_command "cmake --install .") + + message("Qt is now configured for building. Just run '${build_command}'.") + if(QT_WILL_INSTALL) + message("Once everything is built, you must run '${install_command}'.") + message("Qt will be installed into '${CMAKE_INSTALL_PREFIX}'") + else() + message("Once everything is built, Qt is installed.") + message("You should NOT run '${install_command}'") + message("Note that this build cannot be deployed to other machines or devices.") + endif() + message("To configure and build other modules, you can use the following convenience script: + ${CMAKE_INSTALL_PREFIX}/${INSTALL_BINDIR}/qt-cmake") + message("\nIf reconfiguration fails for some reason, try to remove 'CMakeCache.txt' \ +from the build directory \n") +endfunction() + macro(qt_build_repo) qt_build_repo_begin(${ARGN}) |