From 0615218bdf3e240e44e539f9eed6c1cf9fbff2d4 Mon Sep 17 00:00:00 2001
From: Mathieu Malaterre <mathieu.malaterre@gmail.com>
Date: Fri, 30 Oct 2009 12:17:25 -0400
Subject: STYLE: respect convention (while being backward compat)

---
 Modules/FindZLIB.cmake | 20 +++++++++-----------
 1 file 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 )
-- 
cgit v0.12