2 # Find the c-ares includes and library
4 # CARES_INCLUDE_DIR, where to find ares.h, etc.
5 # CARES_LIBRARIES, the libraries needed to use c-ares.
6 # CARES_FOUND, If false, do not try to use c-ares.
7 # also defined, but not for general use are
8 # CARES_LIBRARY, where to find the c-ares library.
10 FIND_PATH(CARES_INCLUDE_DIR ares.h
15 SET(CARES_NAMES ${CARES_NAMES} cares)
16 FIND_LIBRARY(CARES_LIBRARY
18 PATHS /usr/lib /usr/local/lib
21 IF (CARES_LIBRARY AND CARES_INCLUDE_DIR)
22 SET(CARES_LIBRARIES ${CARES_LIBRARY})
23 SET(CARES_FOUND "YES")
24 ELSE (CARES_LIBRARY AND CARES_INCLUDE_DIR)
26 ENDIF (CARES_LIBRARY AND CARES_INCLUDE_DIR)
30 IF (NOT CARES_FIND_QUIETLY)
31 MESSAGE(STATUS "Found c-ares: ${CARES_LIBRARIES}")
32 ENDIF (NOT CARES_FIND_QUIETLY)
34 IF (CARES_FIND_REQUIRED)
35 MESSAGE(FATAL_ERROR "Could not find c-ares library")
36 ENDIF (CARES_FIND_REQUIRED)