summaryrefslogtreecommitdiff
path: root/Modules/FindZLIB.cmake
diff options
context:
space:
mode:
authorMathieu Malaterre <mathieu.malaterre@gmail.com>2009-10-30 12:17:25 -0400
committerMathieu Malaterre <mathieu.malaterre@gmail.com>2009-10-30 12:17:25 -0400
commit0615218bdf3e240e44e539f9eed6c1cf9fbff2d4 (patch)
tree5266f73fb535569e65d5da8130afcb8d32d60255 /Modules/FindZLIB.cmake
parentcabd917460457d2f09825fbc24d2539cfd1c2b0d (diff)
downloadcmake-0615218bdf3e240e44e539f9eed6c1cf9fbff2d4.tar.gz
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 dc80ed8943..806634306b 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 )