d456079b7e
some smaller changes by me. - README.cmake Document how to (one day) run on Windows - CMakeLists.txt Use MSVC compiler flags for MSVC instead of gcc flags - FindWSWinLibs.cmake New: Creates HINTS for finding includes and libraries inside the Wireshark support library installation. - FindXXX.cmake Make use of HINTS generated by FindWSWinLibs.cmake This has not really been tested on Windows as my installation seems to have automagically downloaded some fixes and is in an inconsistent state since. Will probably need to reinstall. svn path=/trunk/; revision=52194
39 lines
1.1 KiB
CMake
39 lines
1.1 KiB
CMake
#
|
|
# $Id$
|
|
#
|
|
# - Find cares
|
|
# Find the native CARES includes and library
|
|
#
|
|
# CARES_INCLUDE_DIRS - where to find cares.h, etc.
|
|
# CARES_LIBRARIES - List of libraries when using cares.
|
|
# CARES_FOUND - True if cares found.
|
|
|
|
|
|
IF (CARES_INCLUDE_DIRS)
|
|
# Already in cache, be silent
|
|
SET(CARES_FIND_QUIETLY TRUE)
|
|
ENDIF (CARES_INCLUDE_DIRS)
|
|
|
|
INCLUDE(FindWSWinLibs)
|
|
FindWSWinLibs("c-ares-.*" "CARES_HINTS")
|
|
|
|
FIND_PATH(CARES_INCLUDE_DIR ares.h HINTS "${CARES_HINTS}/include" )
|
|
|
|
SET(CARES_NAMES cares libcares-2)
|
|
FIND_LIBRARY(CARES_LIBRARY NAMES ${CARES_NAMES} HINTS "${CARES_HINTS}/lib" )
|
|
|
|
# handle the QUIETLY and REQUIRED arguments and set CARES_FOUND to TRUE if
|
|
# all listed variables are TRUE
|
|
INCLUDE(FindPackageHandleStandardArgs)
|
|
FIND_PACKAGE_HANDLE_STANDARD_ARGS(CARES DEFAULT_MSG CARES_LIBRARY CARES_INCLUDE_DIR)
|
|
|
|
IF(CARES_FOUND)
|
|
SET( CARES_LIBRARIES ${CARES_LIBRARY} )
|
|
SET( CARES_INCLUDE_DIRS ${CARES_INCLUDE_DIR} )
|
|
ELSE(CARES_FOUND)
|
|
SET( CARES_LIBRARIES )
|
|
SET( CARES_INCLUDE_DIRS )
|
|
ENDIF(CARES_FOUND)
|
|
|
|
MARK_AS_ADVANCED( CARES_LIBRARIES CARES_INCLUDE_DIRS )
|