summaryrefslogtreecommitdiffstats
path: root/Modules/FindZLIB.cmake
diff options
context:
space:
mode:
authorKovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com>2010-08-04 06:18:05 (GMT)
committerKovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com>2010-08-04 06:18:05 (GMT)
commit5f183caa7c4aaa49cf352df9e6d2db5ab10c9f11 (patch)
treeca15d5c633079e0b5c0367b3abde21d6c08fab24 /Modules/FindZLIB.cmake
parenta42a44a5acd694fbf5a278758723bf7c96ce9ea3 (diff)
downloadCMake-5f183caa7c4aaa49cf352df9e6d2db5ab10c9f11.zip
CMake-5f183caa7c4aaa49cf352df9e6d2db5ab10c9f11.tar.gz
CMake-5f183caa7c4aaa49cf352df9e6d2db5ab10c9f11.tar.bz2
FindZLIB: use the FPHSA version mode
Remove our implementation of version checking and instead use FPHSA()
Diffstat (limited to 'Modules/FindZLIB.cmake')
-rw-r--r--Modules/FindZLIB.cmake17
1 files changed, 2 insertions, 15 deletions
diff --git a/Modules/FindZLIB.cmake b/Modules/FindZLIB.cmake
index fa991f1..3891be4 100644
--- a/Modules/FindZLIB.cmake
+++ b/Modules/FindZLIB.cmake
@@ -62,21 +62,8 @@ ENDIF()
# handle the QUIETLY and REQUIRED arguments and set ZLIB_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(ZLIB DEFAULT_MSG ZLIB_INCLUDE_DIR ZLIB_LIBRARY)
-
-# handle the VERSION provided in find_package() command
-if(ZLIB_FIND_VERSION)
- if(ZLIB_FIND_VERSION_EXACT AND NOT ${ZLIB_VERSION_STRING} VERSION_EQUAL ${ZLIB_FIND_VERSION})
- message(FATAL_ERROR "ZLIB version found (${ZLIB_VERSION_STRING}) does not match the required one (${ZLIB_FIND_VERSION}), aborting.")
- elseif(${ZLIB_VERSION_STRING} VERSION_LESS ${ZLIB_FIND_VERSION})
- if(ZLIB_FIND_REQUIRED)
- message(FATAL_ERROR "ZLIB version found (${ZLIB_VERSION_STRING}) is less then the minimum required (${ZLIB_FIND_VERSION}), aborting.")
- else(ZLIB_FIND_REQUIRED)
- message("ZLIB version found (${ZLIB_VERSION_STRING}) is less then the minimum required (${ZLIB_FIND_VERSION}), continue without ZLIB support.")
- set(ZLIB_FOUND FALSE)
- endif(ZLIB_FIND_REQUIRED)
- endif()
-endif(ZLIB_FIND_VERSION)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(ZLIB REQUIRED_VARS ZLIB_INCLUDE_DIR ZLIB_LIBRARY
+ VERSION_VAR ZLIB_VERSION_STRING)
IF(ZLIB_FOUND)
SET(ZLIB_INCLUDE_DIRS ${ZLIB_INCLUDE_DIR})