vcpkg/ports/curl/0023-fix-find-cares.patch

30 lines
821 B
Diff
Raw Normal View History

diff --git a/CMake/curl-config.cmake.in b/CMake/curl-config.cmake.in
index 496a92d0e..564415ef6 100644
--- a/CMake/curl-config.cmake.in
+++ b/CMake/curl-config.cmake.in
@@ -30,6 +30,9 @@ endif()
if(@USE_ZLIB@)
find_dependency(ZLIB @ZLIB_VERSION_MAJOR@)
endif()
+if(@USE_ARES@)
+ find_dependency(c-ares)
+endif()
include("${CMAKE_CURRENT_LIST_DIR}/@TARGETS_EXPORT_NAME@.cmake")
check_required_components("@PROJECT_NAME@")
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b43520751..dbf62751f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -169,8 +169,8 @@ set(CURL_LIBS "")
if(ENABLE_ARES)
set(USE_ARES 1)
- find_package(CARES REQUIRED)
- list(APPEND CURL_LIBS ${CARES_LIBRARY})
+ find_package(c-ares CONFIG REQUIRED)
+ list(APPEND CURL_LIBS c-ares::cares)
endif()
include(CurlSymbolHiding)