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.
11 # Already in cache, be silent
12 SET(ZLIB_FIND_QUIETLY TRUE)
13 ENDIF (ZLIB_INCLUDE_DIR)
15 FIND_PATH(ZLIB_INCLUDE_DIR zlib.h)
17 SET(ZLIB_NAMES_RELEASE z zlib zdll)
18 FIND_LIBRARY(ZLIB_LIBRARY_RELEASE NAMES ${ZLIB_NAMES_RELEASE} )
20 SET(ZLIB_NAMES_DEBUG zd zlibd zddll)
21 FIND_LIBRARY(ZLIB_LIBRARY_DEBUG NAMES ${ZLIB_NAMES_DEBUG} )
23 SET(ZLIB_LIBRARIES_FOUND )
25 IF(ZLIB_LIBRARY_DEBUG)
26 SET(ZLIB_LIBRARIES_FOUND TRUE)
27 MARK_AS_ADVANCED(ZLIB_LIBRARY_DEBUG)
28 ENDIF(ZLIB_LIBRARY_DEBUG)
30 IF(ZLIB_LIBRARY_RELEASE)
31 SET(ZLIB_LIBRARIES_FOUND TRUE)
32 MARK_AS_ADVANCED(ZLIB_LIBRARY_RELEASE)
33 ENDIF(ZLIB_LIBRARY_RELEASE)
35 # handle the QUIETLY and REQUIRED arguments and set ZLIB_FOUND to TRUE if
36 # all listed variables are TRUE
37 INCLUDE(FindPackageHandleStandardArgs)
38 FIND_PACKAGE_HANDLE_STANDARD_ARGS(ZLIB DEFAULT_MSG
42 MARK_AS_ADVANCED(ZLIB_LIBRARIES_FOUND ZLIB_INCLUDE_DIR)