HACK: pinfo->private_data points to smb_info again
[wireshark-wip.git] / cmake / modules / FindCARES.cmake
blobae552517fb6674fbe9fbef856b365d11ed1c4bf2
2 # $Id$
4 # - Find cares
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)
30 IF(CARES_FOUND)
31   SET( CARES_LIBRARIES ${CARES_LIBRARY} )
32   SET( CARES_INCLUDE_DIRS ${CARES_INCLUDE_DIR} )
33 ELSE(CARES_FOUND)
34   SET( CARES_LIBRARIES )
35   SET( CARES_INCLUDE_DIRS )
36 ENDIF(CARES_FOUND)
38 MARK_AS_ADVANCED( CARES_LIBRARIES CARES_INCLUDE_DIRS )