summaryrefslogtreecommitdiffstats
path: root/Modules/FindPackageHandleStandardArgs.cmake
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2013-03-16 20:42:19 (GMT)
committerBrad King <brad.king@kitware.com>2013-03-18 13:35:07 (GMT)
commit78e6217f314f22fa531261ee16b519a0dd751def (patch)
tree736c7141f6bba07901e4748ad43a0c7735ee2572 /Modules/FindPackageHandleStandardArgs.cmake
parent253a9136549c97bcc2ede80e6861a3a05b064a09 (diff)
downloadCMake-78e6217f314f22fa531261ee16b519a0dd751def.zip
CMake-78e6217f314f22fa531261ee16b519a0dd751def.tar.gz
CMake-78e6217f314f22fa531261ee16b519a0dd751def.tar.bz2
FPHSA: Fix FOUND_VAR check to work with if() auto-dereference
Otherwise, it seems to match on the content of the variable.
Diffstat (limited to 'Modules/FindPackageHandleStandardArgs.cmake')
-rw-r--r--Modules/FindPackageHandleStandardArgs.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/FindPackageHandleStandardArgs.cmake b/Modules/FindPackageHandleStandardArgs.cmake
index 5f92a86..70423a7 100644
--- a/Modules/FindPackageHandleStandardArgs.cmake
+++ b/Modules/FindPackageHandleStandardArgs.cmake
@@ -195,7 +195,7 @@ function(FIND_PACKAGE_HANDLE_STANDARD_ARGS _NAME _FIRST_ARG)
string(TOLOWER ${_NAME} _NAME_LOWER)
if(FPHSA_FOUND_VAR)
- if("${FPHSA_FOUND_VAR}" MATCHES "^${_NAME}_FOUND$" OR "${FPHSA_FOUND_VAR}" MATCHES "^${_NAME_UPPER}_FOUND$")
+ if(FPHSA_FOUND_VAR MATCHES "^${_NAME}_FOUND$" OR FPHSA_FOUND_VAR MATCHES "^${_NAME_UPPER}_FOUND$")
set(_FOUND_VAR ${FPHSA_FOUND_VAR})
else()
message(FATAL_ERROR "The argument for FOUND_VAR is \"${FPHSA_FOUND_VAR}\", but only \"${_NAME}_FOUND\" and \"${_NAME_UPPER}_FOUND\" are valid names.")