Merge topic 'doc-example-package-components' into release-3.23

5317015e68 Help: use package-specific var for supported component list

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6975
This commit is contained in:
Brad King
2022-02-15 14:48:15 +00:00
committed by Kitware Robot
2 changed files with 4 additions and 4 deletions

View File

@@ -1,9 +1,9 @@
@PACKAGE_INIT@
set(_supported_components Addition SquareRoot)
set(_MathFunctions_supported_components Addition SquareRoot)
foreach(_comp ${MathFunctions_FIND_COMPONENTS})
if (NOT _comp IN_LIST _supported_components)
if (NOT _comp IN_LIST _MathFunctions_supported_components)
set(MathFunctions_FOUND False)
set(MathFunctions_NOT_FOUND_MESSAGE "Unsupported component: ${_comp}")
endif()

View File

@@ -446,10 +446,10 @@ be true. This can be tested with logic in the package configuration file:
include("${CMAKE_CURRENT_LIST_DIR}/ClimbingStatsTargets.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/ClimbingStatsMacros.cmake")
set(_supported_components Plot Table)
set(_ClimbingStats_supported_components Plot Table)
foreach(_comp ${ClimbingStats_FIND_COMPONENTS})
if (NOT ";${_supported_components};" MATCHES ";${_comp};")
if (NOT ";${_ClimbingStats_supported_components};" MATCHES ";${_comp};")
set(ClimbingStats_FOUND False)
set(ClimbingStats_NOT_FOUND_MESSAGE "Unsupported component: ${_comp}")
endif()