2023-03-02 02:58:55 +08:00
|
|
|
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@")
|
2023-02-03 08:52:18 +08:00
|
|
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
2023-03-02 02:58:55 +08:00
|
|
|
index b43520751..dbf62751f 100644
|
2023-02-03 08:52:18 +08:00
|
|
|
--- 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)
|