PageRenderTime 13ms CodeModel.GetById 1ms RepoModel.GetById 0ms app.codeStats 0ms

/indra/cmake/FindCARes.cmake

https://bitbucket.org/lindenlab/viewer-beta/
CMake | 48 lines | 30 code | 8 blank | 10 comment | 0 complexity | 29d402e50d60a25a99331739a74915a7 MD5 | raw file
Possible License(s): LGPL-2.1
  1. # -*- cmake -*-
  2. # - Find c-ares
  3. # Find the c-ares includes and library
  4. # This module defines
  5. # CARES_INCLUDE_DIR, where to find ares.h, etc.
  6. # CARES_LIBRARIES, the libraries needed to use c-ares.
  7. # CARES_FOUND, If false, do not try to use c-ares.
  8. # also defined, but not for general use are
  9. # CARES_LIBRARY, where to find the c-ares library.
  10. FIND_PATH(CARES_INCLUDE_DIR ares.h
  11. /usr/local/include
  12. /usr/include
  13. )
  14. SET(CARES_NAMES ${CARES_NAMES} cares)
  15. FIND_LIBRARY(CARES_LIBRARY
  16. NAMES ${CARES_NAMES}
  17. PATHS /usr/lib /usr/local/lib
  18. )
  19. IF (CARES_LIBRARY AND CARES_INCLUDE_DIR)
  20. SET(CARES_LIBRARIES ${CARES_LIBRARY})
  21. SET(CARES_FOUND "YES")
  22. ELSE (CARES_LIBRARY AND CARES_INCLUDE_DIR)
  23. SET(CARES_FOUND "NO")
  24. ENDIF (CARES_LIBRARY AND CARES_INCLUDE_DIR)
  25. IF (CARES_FOUND)
  26. IF (NOT CARES_FIND_QUIETLY)
  27. MESSAGE(STATUS "Found c-ares: ${CARES_LIBRARIES}")
  28. ENDIF (NOT CARES_FIND_QUIETLY)
  29. ELSE (CARES_FOUND)
  30. IF (CARES_FIND_REQUIRED)
  31. MESSAGE(FATAL_ERROR "Could not find c-ares library")
  32. ENDIF (CARES_FIND_REQUIRED)
  33. ENDIF (CARES_FOUND)
  34. # Deprecated declarations.
  35. SET (NATIVE_CARES_INCLUDE_PATH ${CARES_INCLUDE_DIR} )
  36. GET_FILENAME_COMPONENT (NATIVE_CARES_LIB_PATH ${CARES_LIBRARY} PATH)
  37. MARK_AS_ADVANCED(
  38. CARES_LIBRARY
  39. CARES_INCLUDE_DIR
  40. )