From 121cf2babaa736e4110d30b28e41d6c199841aaf Mon Sep 17 00:00:00 2001 From: Andreas Pakulat Date: Wed, 5 May 2010 18:47:06 +0000 Subject: Fix FindPackageHandleStandardArgs.cmake for cmake's config-mode. When using the Config-Mode with a -version-file then cmake automatically sets the _VERSION variable, but it uses the mixed-case that is used as module name. The logic in this file so far however always expected the version variable to be all upper-case breaking the logic when using it in a simplified FindXxx.cmake module. This happened to kdevplatform/kdevelop. svn path=/trunk/KDE/kdelibs/; revision=1123271 --- modules/FindPackageHandleStandardArgs.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/FindPackageHandleStandardArgs.cmake b/modules/FindPackageHandleStandardArgs.cmake index 8e99e88b..fe4345c7 100644 --- a/modules/FindPackageHandleStandardArgs.cmake +++ b/modules/FindPackageHandleStandardArgs.cmake @@ -73,7 +73,11 @@ FUNCTION(FIND_PACKAGE_HANDLE_STANDARD_ARGS _NAME _FAIL_MSG _VAR1 ) # if the package was found, check for the version using _FIND_VERSION IF (${_NAME_UPPER}_FOUND) - SET(VERSION ${${_NAME_UPPER}_VERSION}) + IF(${_NAME_UPPER}_VERSION) + SET(VERSION ${${_NAME_UPPER}_VERSION}) + ELSEIF(${_NAME}_VERSION) + SET(VERSION ${${_NAME}_VERSION}) + ENDIF(${_NAME_UPPER}_VERSION) IF(VERSION) #hmm what do we do if the module in question doesn't set FOO_VERSION but something else ?... Ignore it for now -- cgit v1.2.1