forked from microsoft/vcpkg
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[trantor] fix: link to vcpkg c-ares target (microsoft#32735)
- Loading branch information
1 parent
151c42c
commit ebf90b9
Showing
5 changed files
with
43 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index 83bd458..ad56a27 100755 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -135,7 +135,7 @@ endif() | ||
|
||
set(HAVE_C-ARES NO) | ||
if (BUILD_C-ARES) | ||
- find_package(c-ares) | ||
+ find_package(c-ares CONFIG) | ||
if(c-ares_FOUND) | ||
message(STATUS "c-ares found!") | ||
set(HAVE_C-ARES TRUE) | ||
@@ -143,7 +143,7 @@ if (BUILD_C-ARES) | ||
endif () | ||
|
||
if(HAVE_C-ARES) | ||
- target_link_libraries(${PROJECT_NAME} PRIVATE c-ares_lib) | ||
+ target_link_libraries(${PROJECT_NAME} PRIVATE c-ares::cares) | ||
set(TRANTOR_SOURCES | ||
${TRANTOR_SOURCES} | ||
trantor/net/inner/AresResolver.cc) | ||
diff --git a/cmake/templates/TrantorConfig.cmake.in b/cmake/templates/TrantorConfig.cmake.in | ||
index e18652d..6dad38e 100644 | ||
--- a/cmake/templates/TrantorConfig.cmake.in | ||
+++ b/cmake/templates/TrantorConfig.cmake.in | ||
@@ -14,7 +14,7 @@ if(@OpenSSL_FOUND@) | ||
find_dependency(OpenSSL) | ||
endif() | ||
if(@c-ares_FOUND@) | ||
- find_dependency(c-ares) | ||
+ find_dependency(c-ares CONFIG) | ||
endif() | ||
find_dependency(Threads) | ||
# Compute paths |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters