summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
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