STYLE: respect convention (while being backward compat)

This commit is contained in:
Mathieu Malaterre 2009-10-30 12:17:25 -04:00
parent cabd917460
commit 0615218bdf
1 changed files with 9 additions and 11 deletions

View File

@ -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 )