aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/cmake/FindCARes.cmake
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/cmake/FindCARes.cmake48
1 files changed, 48 insertions, 0 deletions
diff --git a/linden/indra/cmake/FindCARes.cmake b/linden/indra/cmake/FindCARes.cmake
new file mode 100644
index 0000000..1ed5b32
--- /dev/null
+++ b/linden/indra/cmake/FindCARes.cmake
@@ -0,0 +1,48 @@
1# -*- cmake -*-
2
3# - Find c-ares
4# Find the c-ares includes and library
5# This module defines
6# CARES_INCLUDE_DIR, where to find ares.h, etc.
7# CARES_LIBRARIES, the libraries needed to use c-ares.
8# CARES_FOUND, If false, do not try to use c-ares.
9# also defined, but not for general use are
10# CARES_LIBRARY, where to find the c-ares library.
11
12FIND_PATH(CARES_INCLUDE_DIR ares.h
13/usr/local/include
14/usr/include
15)
16
17SET(CARES_NAMES ${CARES_NAMES} cares)
18FIND_LIBRARY(CARES_LIBRARY
19 NAMES ${CARES_NAMES}
20 PATHS /usr/lib /usr/local/lib
21 )
22
23IF (CARES_LIBRARY AND CARES_INCLUDE_DIR)
24 SET(CARES_LIBRARIES ${CARES_LIBRARY})
25 SET(CARES_FOUND "YES")
26ELSE (CARES_LIBRARY AND CARES_INCLUDE_DIR)
27 SET(CARES_FOUND "NO")
28ENDIF (CARES_LIBRARY AND CARES_INCLUDE_DIR)
29
30
31IF (CARES_FOUND)
32 IF (NOT CARES_FIND_QUIETLY)
33 MESSAGE(STATUS "Found c-ares: ${CARES_LIBRARIES}")
34 ENDIF (NOT CARES_FIND_QUIETLY)
35ELSE (CARES_FOUND)
36 IF (CARES_FIND_REQUIRED)
37 MESSAGE(FATAL_ERROR "Could not find c-ares library")
38 ENDIF (CARES_FIND_REQUIRED)
39ENDIF (CARES_FOUND)
40
41# Deprecated declarations.
42SET (NATIVE_CARES_INCLUDE_PATH ${CARES_INCLUDE_DIR} )
43GET_FILENAME_COMPONENT (NATIVE_CARES_LIB_PATH ${CARES_LIBRARY} PATH)
44
45MARK_AS_ADVANCED(
46 CARES_LIBRARY
47 CARES_INCLUDE_DIR
48 )