2023-07-26 14:28:18 +08:00
|
|
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
2024-06-11 07:54:02 +08:00
|
|
|
index a0b10de..ee63bc8 100755
|
2023-07-26 14:28:18 +08:00
|
|
|
--- a/CMakeLists.txt
|
|
|
|
+++ b/CMakeLists.txt
|
2024-06-11 07:54:02 +08:00
|
|
|
@@ -245,7 +245,7 @@ endif(HAVE_SPDLOG)
|
2023-07-26 14:28:18 +08:00
|
|
|
|
|
|
|
set(HAVE_C-ARES NO)
|
2024-06-11 07:54:02 +08:00
|
|
|
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)
|
|
|
|
@@ -256,7 +256,7 @@ if(HAVE_C-ARES)
|
|
|
|
if(NOT BUILD_SHARED_LIBS)
|
2024-01-23 03:01:15 +08:00
|
|
|
target_compile_definitions(${PROJECT_NAME} PRIVATE CARES_STATICLIB)
|
2024-06-11 07:54:02 +08:00
|
|
|
endif()
|
2023-07-26 14:28:18 +08:00
|
|
|
- target_link_libraries(${PROJECT_NAME} PRIVATE c-ares_lib)
|
|
|
|
+ target_link_libraries(${PROJECT_NAME} PRIVATE c-ares::cares)
|
2024-06-11 07:54:02 +08:00
|
|
|
set(TRANTOR_SOURCES ${TRANTOR_SOURCES} trantor/net/inner/AresResolver.cc)
|
|
|
|
set(private_headers ${private_headers} trantor/net/inner/AresResolver.h)
|
|
|
|
if(APPLE)
|
|
|
|
@@ -382,8 +382,6 @@ write_basic_package_version_file(
|
|
|
|
install(
|
|
|
|
FILES "${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/TrantorConfig.cmake"
|
|
|
|
"${CMAKE_CURRENT_BINARY_DIR}/TrantorConfigVersion.cmake"
|
|
|
|
- "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules/Findc-ares.cmake"
|
|
|
|
- "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules/FindBotan.cmake"
|
2024-04-03 10:20:35 +08:00
|
|
|
DESTINATION "${INSTALL_TRANTOR_CMAKE_DIR}"
|
2024-06-11 07:54:02 +08:00
|
|
|
COMPONENT dev
|
|
|
|
)
|
2023-07-26 14:28:18 +08:00
|
|
|
diff --git a/cmake/templates/TrantorConfig.cmake.in b/cmake/templates/TrantorConfig.cmake.in
|
2024-06-11 07:54:02 +08:00
|
|
|
index e9422ed..142d1d6 100644
|
2023-07-26 14:28:18 +08:00
|
|
|
--- a/cmake/templates/TrantorConfig.cmake.in
|
|
|
|
+++ b/cmake/templates/TrantorConfig.cmake.in
|
2024-06-11 07:54:02 +08:00
|
|
|
@@ -19,7 +19,7 @@ if(@Botan_FOUND@)
|
2023-10-03 11:48:58 +08:00
|
|
|
find_dependency(Botan)
|
2023-07-26 14:28:18 +08:00
|
|
|
endif()
|
|
|
|
if(@c-ares_FOUND@)
|
|
|
|
- find_dependency(c-ares)
|
|
|
|
+ find_dependency(c-ares CONFIG)
|
|
|
|
endif()
|
|
|
|
find_dependency(Threads)
|
2023-11-28 14:48:28 +08:00
|
|
|
if(@spdlog_FOUND@)
|