mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-03 20:29:56 -06:00
These new global properties were added: * FeatureSummary_PKG_TYPES: Package types accepted by FeatureSummary (default REQUIRED RECOMMENDED OPTIONAL RUNTIME). * FeatureSummary_REQUIRED_PKG_TYPES: Package types that will cause FeatureSummary to abort when called with FATAL_ON_MISSING_REQUIRED_PACKAGES and a package in these categories is missing (default REQUIRED). * FeatureSummary_DEFAULT_PKG_TYPE: Default package type assigned when not explicitly assigned by the user (default OPTIONAL). This allows to add and remove new package types that can be printed selectively using the "WHAT" argument.
17 lines
555 B
CMake
17 lines
555 B
CMake
include(FeatureSummary)
|
|
|
|
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR})
|
|
|
|
set_property(GLOBAL PROPERTY FeatureSummary_PKG_TYPES TYPE1 TYPE2 TYPE3)
|
|
set_property(GLOBAL PROPERTY FeatureSummary_REQUIRED_PKG_TYPES TYPE3)
|
|
set_property(GLOBAL PROPERTY FeatureSummary_DEFAULT_PKG_TYPE TYPE2)
|
|
|
|
find_package(Foo)
|
|
find_package(Bar)
|
|
|
|
set_package_properties(Foo PROPERTIES TYPE TYPE3)
|
|
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
|
|
|
|
set_package_properties(Bar PROPERTIES TYPE TYPE3)
|
|
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
|