Skip to content
This repository has been archived by the owner on Sep 26, 2020. It is now read-only.

Commit

Permalink
Use Hunter to download c-ares
Browse files Browse the repository at this point in the history
  • Loading branch information
ruslo committed Jul 16, 2018
1 parent 4ff2384 commit c5f584f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CMake/Config.cmake.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
@PACKAGE_INIT@

if("@ENABLE_ARES@")
find_package(c-ares CONFIG REQUIRED)
endif()

if(@HAVE_ZLIB@)
find_package(ZLIB CONFIG REQUIRED)
endif()
Expand Down
7 changes: 7 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,14 @@ set(CURL_LIBS "")

if(ENABLE_ARES)
set(USE_ARES 1)
if(HUNTER_ENABLED)
hunter_add_package(c-ares)
find_package(c-ares CONFIG REQUIRED)
set(CARES_INCLUDE_DIR "${C-ARES_ROOT}/include")
set(CARES_LIBRARY c-ares::cares)
else()
find_package(CARES REQUIRED)
endif()
list(APPEND CURL_LIBS ${CARES_LIBRARY} )
set(CURL_LIBS ${CURL_LIBS} ${CARES_LIBRARY})
endif()
Expand Down

0 comments on commit c5f584f

Please sign in to comment.