diff options
author | Michal Klocek <michal.klocek@qt.io> | 2021-02-02 10:49:19 +0100 |
---|---|---|
committer | Michal Klocek <michal.klocek@qt.io> | 2021-05-12 09:40:28 +0200 |
commit | a60304e7ea154438060a71959f72a4a1b95f5327 (patch) | |
tree | 8aca57af64fcfa579c63cd2a0caa5c6073544cd4 /CMakeLists.txt | |
parent | b8fb47478db06cac231a8a7222e7afbce7b3cf90 (diff) |
Add configure.cmake files
Only evaluate features in the super repo and do not
create config headers files during the configure step.
However, print the build summary.
The build config headers will be created during the
configure step of 'libs' external project.
Done-With: Jüri Valdmann <juri.valdmann@qt.io>
Done-With: Allan Sandfeld Jensen <allan.jensen@qt.io>
Task-number: QTBUG-91760
Task-number: COIN-711
Change-Id: I481525571e71ca4684de5827f641416035a8f22a
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 42c4faa7d..ab7dd4212 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,6 +14,37 @@ find_package(Qt6 ${PROJECT_VERSION} CONFIG REQUIRED COMPONENTS BuildInternals Co set(installDir ${CMAKE_CURRENT_BINARY_DIR}/install) +### FEATURES + +qt_build_repo_begin() +qt_feature_module_begin(ONLY_EVALUATE_FEATURES) +# Enable printing of feature summary by forcing qt_configure_record_command +# to work in spite of ONLY_EVALUATE_FEATURES. +set(__QtFeature_only_evaluate_features OFF) +include(configure.cmake) +qt_feature_module_end(ONLY_EVALUATE_FEATURES) +qt_build_repo_end() + +if(NOT ${webEngineSupport}) + add_custom_target(WebEngineErrorMessage ALL + ${CMAKE_COMMAND} -E cmake_echo_color --red "QtWebEngine will not be built: ${webEngineError}" + COMMENT "Check QtWebEngine support") + message("-- Support check for QtWebEngine failed: ${webEngineError}") + set(QT_FEATURE_qtwebengine_build OFF CACHE BOOL "Build QtWebEngine" FORCE) +endif() + +if(NOT ${pdfSupport}) + add_custom_target(PdfErrorMessage ALL + ${CMAKE_COMMAND} -E cmake_echo_color --red "QtPdf will not be built: ${pdfError}" + COMMENT "Check QtPdf support") + message("-- Support check for QtPdf failed: ${pdfError}") + set(QT_FEATURE_qtpdf_build OFF CACHE BOOL "Build QtPdf" FORCE) +endif() + +if(NOT QT_FEATURE_qtwebengine_build AND NOT QT_FEATURE_qtpdf_build) + return() +endif() + ### NINJA if(NOT Ninja_FOUND) |