5 # Find the native CARES includes and library
7 # CARES_INCLUDE_DIRS - where to find cares.h, etc.
8 # CARES_LIBRARIES - List of libraries when using cares.
9 # CARES_FOUND - True if cares found.
12 IF (CARES_INCLUDE_DIRS)
13 # Already in cache, be silent
14 SET(CARES_FIND_QUIETLY TRUE)
15 ENDIF (CARES_INCLUDE_DIRS)
17 INCLUDE(FindWSWinLibs)
18 FindWSWinLibs("c-ares-.*" "CARES_HINTS")
20 FIND_PATH(CARES_INCLUDE_DIR ares.h HINTS "${CARES_HINTS}/include" )
22 SET(CARES_NAMES cares libcares-2)
23 FIND_LIBRARY(CARES_LIBRARY NAMES ${CARES_NAMES} HINTS "${CARES_HINTS}/lib" )
25 # handle the QUIETLY and REQUIRED arguments and set CARES_FOUND to TRUE if
26 # all listed variables are TRUE
27 INCLUDE(FindPackageHandleStandardArgs)
28 FIND_PACKAGE_HANDLE_STANDARD_ARGS(CARES DEFAULT_MSG CARES_LIBRARY CARES_INCLUDE_DIR)
31 SET( CARES_LIBRARIES ${CARES_LIBRARY} )
32 SET( CARES_INCLUDE_DIRS ${CARES_INCLUDE_DIR} )
34 SET( CARES_LIBRARIES )
35 SET( CARES_INCLUDE_DIRS )
38 MARK_AS_ADVANCED( CARES_LIBRARIES CARES_INCLUDE_DIRS )