tibia-client/src/framework/cmake/FindZLIB.cmake

16 lines
639 B
CMake
Raw Normal View History

# 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)
SET(_ZLIB_STATIC_LIBS libz.a libzlib.a zlib1.a)
SET(_ZLIB_SHARED_LIBS z zlib zdll zlib1)
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)
MARK_AS_ADVANCED(ZLIB_LIBRARY ZLIB_INCLUDE_DIR)