You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
1007 B

  1. #
  2. # From CMake 2.6.1 + some path changes
  3. #
  4. # - Find zlib
  5. # Find the native ZLIB includes and library
  6. #
  7. # ZLIB_INCLUDE_DIR - where to find zlib.h, etc.
  8. # ZLIB_LIBRARIES - List of libraries when using zlib.
  9. # ZLIB_FOUND - True if zlib found.
  10. IF(MSYS)
  11. SET(ZLIB_DIR_SEARCH
  12. c:/msys/1.0
  13. )
  14. ENDIF(MSYS)
  15. IF (ZLIB_INCLUDE_DIR)
  16. # Already in cache, be silent
  17. SET(ZLIB_FIND_QUIETLY TRUE)
  18. ENDIF (ZLIB_INCLUDE_DIR)
  19. FIND_PATH(ZLIB_INCLUDE_DIR zlib.h PATHS ${ZLIB_DIR_SEARCH}/local/include)
  20. SET(ZLIB_NAMES z zlib zdll)
  21. FIND_LIBRARY(ZLIB_LIBRARY NAMES ${ZLIB_NAMES} PATHS ${ZLIB_DIR_SEARCH}/local/lib)
  22. # handle the QUIETLY and REQUIRED arguments and set ZLIB_FOUND to TRUE if
  23. # all listed variables are TRUE
  24. INCLUDE(FindPackageHandleStandardArgs)
  25. FIND_PACKAGE_HANDLE_STANDARD_ARGS(ZLIB DEFAULT_MSG ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
  26. IF(ZLIB_FOUND)
  27. SET( ZLIB_LIBRARIES ${ZLIB_LIBRARY} )
  28. ELSE(ZLIB_FOUND)
  29. SET( ZLIB_LIBRARIES )
  30. ENDIF(ZLIB_FOUND)
  31. MARK_AS_ADVANCED( ZLIB_LIBRARY ZLIB_INCLUDE_DIR )