2012-06-22 21:04:03 +02:00
|
|
|
# Try to find the ZLIB library
|
|
|
|
# ZLIB_FOUND - system has ZLIB
|
|
|
|
# ZLIB_INCLUDE_DIR - the ZLIB include directory
|
|
|
|
# ZLIB_LIBRARY - the ZLIB library
|
2011-05-15 23:12:39 +02:00
|
|
|
|
|
|
|
FIND_PATH(ZLIB_INCLUDE_DIR NAMES zlib.h)
|
2012-06-22 21:04:03 +02:00
|
|
|
SET(_ZLIB_STATIC_LIBS libz.a libzlib.a zlib1.a)
|
2012-08-18 19:08:05 +02:00
|
|
|
SET(_ZLIB_SHARED_LIBS z zlib zdll zlib1)
|
2012-06-22 21:04:03 +02:00
|
|
|
IF(USE_STATIC_LIBS)
|
|
|
|
FIND_LIBRARY(ZLIB_LIBRARY NAMES ${_ZLIB_STATIC_LIBS} ${_ZLIB_SHARED_LIBS})
|
|
|
|
ELSE()
|
|
|
|
FIND_LIBRARY(ZLIB_LIBRARY NAMES ${_ZLIB_SHARED_LIBS} ${_ZLIB_STATIC_LIBS})
|
|
|
|
ENDIF()
|
2011-05-15 23:12:39 +02:00
|
|
|
INCLUDE(FindPackageHandleStandardArgs)
|
|
|
|
FIND_PACKAGE_HANDLE_STANDARD_ARGS(ZLIB DEFAULT_MSG ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
|
2012-06-22 21:04:03 +02:00
|
|
|
MARK_AS_ADVANCED(ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
|