PageRenderTime 29ms CodeModel.GetById 6ms RepoModel.GetById 0ms app.codeStats 0ms

/indra/cmake/FindZLIB.cmake

https://bitbucket.org/lindenlab/viewer-beta/
CMake | 46 lines | 25 code | 7 blank | 14 comment | 6 complexity | 7addb1d6f6b9d2de0a6be7f1f06b66c5 MD5 | raw file
Possible License(s): LGPL-2.1
  1. # -*- cmake -*-
  2. # - Find zlib
  3. # Find the ZLIB includes and library
  4. # This module defines
  5. # ZLIB_INCLUDE_DIRS, where to find zlib.h, etc.
  6. # ZLIB_LIBRARIES, the libraries needed to use zlib.
  7. # ZLIB_FOUND, If false, do not try to use zlib.
  8. #
  9. # This FindZLIB is about 43 times as fast the one provided with cmake (2.8.x),
  10. # because it doesn't look up the version of zlib, resulting in a dramatic
  11. # speed up for configure (from 4 minutes 22 seconds to 6 seconds).
  12. #
  13. # Note: Since this file is only used for standalone, the windows
  14. # specific parts were left out.
  15. FIND_PATH(ZLIB_INCLUDE_DIR zlib.h
  16. NO_SYSTEM_ENVIRONMENT_PATH
  17. )
  18. FIND_LIBRARY(ZLIB_LIBRARY z)
  19. if (ZLIB_LIBRARY AND ZLIB_INCLUDE_DIR)
  20. SET(ZLIB_INCLUDE_DIRS ${ZLIB_INCLUDE_DIR})
  21. SET(ZLIB_LIBRARIES ${ZLIB_LIBRARY})
  22. SET(ZLIB_FOUND "YES")
  23. else (ZLIB_LIBRARY AND ZLIB_INCLUDE_DIR)
  24. SET(ZLIB_FOUND "NO")
  25. endif (ZLIB_LIBRARY AND ZLIB_INCLUDE_DIR)
  26. if (ZLIB_FOUND)
  27. if (NOT ZLIB_FIND_QUIETLY)
  28. message(STATUS "Found ZLIB: ${ZLIB_LIBRARIES}")
  29. SET(ZLIB_FIND_QUIETLY TRUE)
  30. endif (NOT ZLIB_FIND_QUIETLY)
  31. else (ZLIB_FOUND)
  32. if (ZLIB_FIND_REQUIRED)
  33. message(FATAL_ERROR "Could not find ZLIB library")
  34. endif (ZLIB_FIND_REQUIRED)
  35. endif (ZLIB_FOUND)
  36. mark_as_advanced(
  37. ZLIB_LIBRARY
  38. ZLIB_INCLUDE_DIR
  39. )