|
@@ -56,7 +56,8 @@ implementing :command:`find_package(<PackageName>)` calls.
|
|
|
Specifies either ``<PackageName>_FOUND`` or
|
|
|
``<PACKAGENAME>_FOUND`` as the result variable. This exists only
|
|
|
for compatibility with older versions of CMake and is now ignored.
|
|
|
- Result variables of both names are always set for compatibility.
|
|
|
+ Result variables of both names are now always set for compatibility
|
|
|
+ also with or without this option.
|
|
|
|
|
|
``REQUIRED_VARS <required-var>...``
|
|
|
Specify the variables which are required for this package.
|
|
@@ -467,13 +468,12 @@ function(FIND_PACKAGE_HANDLE_STANDARD_ARGS _NAME _FIRST_ARG)
|
|
|
if(FPHSA_FOUND_VAR)
|
|
|
set(_FOUND_VAR_UPPER ${_NAME_UPPER}_FOUND)
|
|
|
set(_FOUND_VAR_MIXED ${_NAME}_FOUND)
|
|
|
- if(FPHSA_FOUND_VAR STREQUAL _FOUND_VAR_MIXED OR FPHSA_FOUND_VAR STREQUAL _FOUND_VAR_UPPER)
|
|
|
- set(_FOUND_VAR ${FPHSA_FOUND_VAR})
|
|
|
- else()
|
|
|
+ if(
|
|
|
+ NOT FPHSA_FOUND_VAR STREQUAL _FOUND_VAR_MIXED
|
|
|
+ AND NOT FPHSA_FOUND_VAR STREQUAL _FOUND_VAR_UPPER
|
|
|
+ )
|
|
|
message(FATAL_ERROR "The argument for FOUND_VAR is \"${FPHSA_FOUND_VAR}\", but only \"${_FOUND_VAR_MIXED}\" and \"${_FOUND_VAR_UPPER}\" are valid names.")
|
|
|
endif()
|
|
|
- else()
|
|
|
- set(_FOUND_VAR ${_NAME_UPPER}_FOUND)
|
|
|
endif()
|
|
|
|
|
|
# collect all variables which were not found, so they can be printed, so the
|