summaryrefslogtreecommitdiffstats
path: root/Modules/FindZLIB.cmake
diff options
context:
space:
mode:
authorMathieu Malaterre <mathieu.malaterre@gmail.com>2009-10-30 16:17:25 (GMT)
committerMathieu Malaterre <mathieu.malaterre@gmail.com>2009-10-30 16:17:25 (GMT)
commit0615218bdf3e240e44e539f9eed6c1cf9fbff2d4 (patch)
tree5266f73fb535569e65d5da8130afcb8d32d60255 /Modules/FindZLIB.cmake
parentcabd917460457d2f09825fbc24d2539cfd1c2b0d (diff)
downloadCMake-0615218bdf3e240e44e539f9eed6c1cf9fbff2d4.zip
CMake-0615218bdf3e240e44e539f9eed6c1cf9fbff2d4.tar.gz
CMake-0615218bdf3e240e44e539f9eed6c1cf9fbff2d4.tar.bz2
STYLE: respect convention (while being backward compat)
Diffstat (limited to 'Modules/FindZLIB.cmake')
-rw-r--r--Modules/FindZLIB.cmake20
1 files changed, 9 insertions, 11 deletions
diff --git a/Modules/FindZLIB.cmake b/Modules/FindZLIB.cmake
index dc80ed8..8066343 100644
--- a/Modules/FindZLIB.cmake
+++ b/Modules/FindZLIB.cmake
@@ -1,9 +1,9 @@
# - Find zlib
# Find the native ZLIB includes and library
#
-# ZLIB_INCLUDE_DIR - where to find zlib.h, etc.
-# ZLIB_LIBRARIES - List of libraries when using zlib.
-# ZLIB_FOUND - True if zlib found.
+# ZLIB_INCLUDE_DIRS - where to find zlib.h, etc.
+# ZLIB_LIBRARIES - List of libraries when using zlib.
+# ZLIB_FOUND - True if zlib found.
#=============================================================================
# Copyright 2001-2009 Kitware, Inc.
@@ -27,16 +27,14 @@ FIND_PATH(ZLIB_INCLUDE_DIR zlib.h)
SET(ZLIB_NAMES z zlib zdll)
FIND_LIBRARY(ZLIB_LIBRARY NAMES ${ZLIB_NAMES} )
+MARK_AS_ADVANCED( ZLIB_LIBRARY ZLIB_INCLUDE_DIR )
+
+# Per-recommendation
+SET(ZLIB_INCLUDE_DIRS "${ZLIB_INCLUDE_DIR}")
+SET(ZLIB_LIBRARIES "${ZLIB_LIBRARY}")
# 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_LIBRARY ZLIB_INCLUDE_DIR)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(ZLIB DEFAULT_MSG ZLIB_LIBRARIES ZLIB_INCLUDE_DIRS)
-IF(ZLIB_FOUND)
- SET( ZLIB_LIBRARIES ${ZLIB_LIBRARY} )
-ELSE(ZLIB_FOUND)
- SET( ZLIB_LIBRARIES )
-ENDIF(ZLIB_FOUND)
-
-MARK_AS_ADVANCED( ZLIB_LIBRARY ZLIB_INCLUDE_DIR )