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)
|
2013-01-08 20:40:25 +01:00
|
|
|
SET(_ZLIB_SHARED_LIBS libz.dll.a zdll zlib zlib1 z)
|
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)
|