FindZLIB.cmake 615 B

1234567891011121314151617181920212223242526272829
  1. # - Find zlib
  2. # Find the native ZLIB includes and library
  3. #
  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.
  7. FIND_PATH(ZLIB_INCLUDE_DIR zlib.h
  8. /usr/local/include
  9. /usr/include
  10. )
  11. SET(ZLIB_NAMES ${ZLIB_NAMES} z zlib)
  12. FIND_LIBRARY(ZLIB_LIBRARY
  13. NAMES ${ZLIB_NAMES}
  14. PATHS /usr/lib /usr/local/lib
  15. )
  16. IF(ZLIB_INCLUDE_DIR)
  17. IF(ZLIB_LIBRARY)
  18. SET( ZLIB_LIBRARIES ${ZLIB_LIBRARY} )
  19. SET( ZLIB_FOUND "YES" )
  20. ENDIF(ZLIB_LIBRARY)
  21. ENDIF(ZLIB_INCLUDE_DIR)
  22. MARK_AS_ADVANCED(
  23. ZLIB_LIBRARY
  24. ZLIB_INCLUDE_DIR
  25. )