Resync
[CMakeLuaTailorHgBridge.git] / CMakeLua / Modules / FindZLIB.cmake
blob23ea93726532fec2d6efb4413ce2830d1b18ee29
1 # - Find zlib
2 # Find the native ZLIB includes and library
4 #  ZLIB_INCLUDE_DIR - where to find zlib.h, etc.
5 #  ZLIB_LIBRARIES   - List of libraries when using zlib.
6 #  ZLIB_FOUND       - True if zlib found.
9 IF (ZLIB_INCLUDE_DIR)
10   # Already in cache, be silent
11   SET(ZLIB_FIND_QUIETLY TRUE)
12 ENDIF (ZLIB_INCLUDE_DIR)
14 FIND_PATH(ZLIB_INCLUDE_DIR zlib.h)
16 SET(ZLIB_NAMES z zlib zdll)
17 FIND_LIBRARY(ZLIB_LIBRARY NAMES ${ZLIB_NAMES} )
19 # handle the QUIETLY and REQUIRED arguments and set ZLIB_FOUND to TRUE if 
20 # all listed variables are TRUE
21 INCLUDE(FindPackageHandleStandardArgs)
22 FIND_PACKAGE_HANDLE_STANDARD_ARGS(ZLIB DEFAULT_MSG ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
24 IF(ZLIB_FOUND)
25   SET( ZLIB_LIBRARIES ${ZLIB_LIBRARY} )
26 ELSE(ZLIB_FOUND)
27   SET( ZLIB_LIBRARIES )
28 ENDIF(ZLIB_FOUND)
30 MARK_AS_ADVANCED( ZLIB_LIBRARY ZLIB_INCLUDE_DIR )