diff options
author | Mathieu Malaterre <mathieu.malaterre@gmail.com> | 2009-10-30 16:17:25 (GMT) |
---|---|---|
committer | Mathieu Malaterre <mathieu.malaterre@gmail.com> | 2009-10-30 16:17:25 (GMT) |
commit | 0615218bdf3e240e44e539f9eed6c1cf9fbff2d4 (patch) | |
tree | 5266f73fb535569e65d5da8130afcb8d32d60255 /Modules/FindZLIB.cmake | |
parent | cabd917460457d2f09825fbc24d2539cfd1c2b0d (diff) | |
download | CMake-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.cmake | 20 |
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 ) |