summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2014-07-09 13:02:37 +0200
committerFlorent Le Coz <louiz@louiz.org>2015-02-23 13:56:08 +0100
commitb86547dc1ef407ca3838444533bc7145e32a0d90 (patch)
tree3aa692def62796a5debe705ebc29d40b311e38cb /CMakeLists.txt
parenta17135720e77c03e66679852198e46a070d56f4d (diff)
downloadbiboumi-b86547dc1ef407ca3838444533bc7145e32a0d90.tar.gz
biboumi-b86547dc1ef407ca3838444533bc7145e32a0d90.tar.bz2
biboumi-b86547dc1ef407ca3838444533bc7145e32a0d90.tar.xz
biboumi-b86547dc1ef407ca3838444533bc7145e32a0d90.zip
Implement async DNS resolution using c-ares
fix #2533
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt13
1 files changed, 13 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 138bdeb..6272811 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -39,6 +39,12 @@ elseif(NOT WITHOUT_BOTAN)
find_package(BOTAN)
endif()
+if(WITH_CARES)
+ find_package(CARES REQUIRED)
+elseif(NOT WITHOUT_CARES)
+ find_package(CARES)
+endif()
+
#
## Get the software version
#
@@ -84,6 +90,10 @@ if(BOTAN_FOUND)
include_directories(SYSTEM ${BOTAN_INCLUDE_DIRS})
endif()
+if(CARES_FOUND)
+ include_directories(${CARES_INCLUDE_DIRS})
+endif()
+
set(POLLER_DOCSTRING "Choose the poller between POLL and EPOLL (Linux-only)")
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
set(POLLER "EPOLL" CACHE STRING ${POLLER_DOCSTRING})
@@ -145,6 +155,9 @@ target_link_libraries(network logger)
if(BOTAN_FOUND)
target_link_libraries(network ${BOTAN_LIBRARIES})
endif()
+if(CARES_FOUND)
+ target_link_libraries(network ${CARES_LIBRARIES})
+endif()
#
## irclib