diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2019-04-08 14:37:33 +0200 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2019-04-08 14:53:24 +0000 |
commit | e0b414448653e722f3e7255a9b8522be961ceb91 (patch) | |
tree | 6aea3598c7438c9265b4601678e7d7afb63073ca /CMakeLists.txt | |
parent | 5691d2f47b19cde0cec76747ceca0a275292bfd0 (diff) |
Force feature_summary to fail when a required package is not found
Apparently calling set_package_properties with TYPE REQUIRED and
then calling feature_summary with FATAL_ON_MISSING_REQUIRED_PACKAGES
and PACKAGES_NOT_FOUND is not enough to make CMake fail when not
finding a required package.
You have to explicitly set REQUIRED_PACKAGES_NOT_FOUND to force
feature_summary to fail when a package is not found.
Do this, and also explicitly add the rest of the NOT FOUND cases,
to get a slightly clearer overview what kind of packages were not
found.
Task-number: QTBUG-74133
Change-Id: Id21af13dafafe0a458cff479e8abbc6aa7e6a3f7
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 1eab8afcca..b43a662285 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -53,4 +53,9 @@ endif() include(QtPostProcess) ## Print a feature summary: -feature_summary(WHAT PACKAGES_FOUND PACKAGES_NOT_FOUND FATAL_ON_MISSING_REQUIRED_PACKAGES) +feature_summary(WHAT PACKAGES_FOUND + REQUIRED_PACKAGES_NOT_FOUND + RECOMMENDED_PACKAGES_NOT_FOUND + OPTIONAL_PACKAGES_NOT_FOUND + RUNTIME_PACKAGES_NOT_FOUND + FATAL_ON_MISSING_REQUIRED_PACKAGES) |