From ca6b1e2b2142c7727bca82540c14d2a9c41e1a05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Mayer?= Date: Wed, 9 Sep 2009 13:20:33 +0000 Subject: CMAKE: Get most of of missing *build* pieces into place svn path=/trunk/; revision=29819 --- cmake/modules/FindCARES.cmake | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 cmake/modules/FindCARES.cmake (limited to 'cmake/modules/FindCARES.cmake') diff --git a/cmake/modules/FindCARES.cmake b/cmake/modules/FindCARES.cmake new file mode 100644 index 0000000000..6c046bec14 --- /dev/null +++ b/cmake/modules/FindCARES.cmake @@ -0,0 +1,32 @@ +# - 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) + +FIND_PATH(CARES_INCLUDE_DIR cares.h) + +SET(CARES_NAMES cares) +FIND_LIBRARY(CARES_LIBRARY NAMES ${CARES_NAMES} ) + +# 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 ) -- cgit v1.2.3