Skip to content

Commit

Permalink
Fix c-ares link issue
Browse files Browse the repository at this point in the history
  • Loading branch information
halx99 committed Feb 5, 2024
1 parent 7dd7dc4 commit fb0ff3f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
8 changes: 7 additions & 1 deletion 1k/fetch.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,17 @@ function(_1kfetch_dist package_name)
list(GET _status 0 status_code)
list(GET _status 1 status_string)
if(NOT status_code EQUAL 0)
file(REMOVE ${package_store})
message(FATAL_ERROR "Download ${package_url} fail, ${status_string}, logs: ${_logs}")
endif()
endif()
file(ARCHIVE_EXTRACT INPUT ${package_store} DESTINATION ${CMAKE_CURRENT_LIST_DIR}/)
file(RENAME ${CMAKE_CURRENT_LIST_DIR}/${package_name} ${_prebuilt_root})
if (IS_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/${package_name})
file(RENAME ${CMAKE_CURRENT_LIST_DIR}/${package_name} ${_prebuilt_root})
else() # download may fail
file(REMOVE ${package_store})
message(FATAL_ERROR "The package ${package_store} is malformed, please try again!")
endif()
endif()

# set platform specific path, PLATFORM_NAME provided by user: win32,winrt,mac,ios,android,tvos,watchos,linux
Expand Down
1 change: 1 addition & 0 deletions thirdparty/yasio/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ target_include_directories(${target_name} PUBLIC ${CMAKE_CURRENT_LIST_DIR})
if(CARES_INCLUDE_DIR)
target_compile_definitions(${target_name} PUBLIC YASIO_USE_CARES=1)
target_include_directories(${target_name} PUBLIC ${CARES_INCLUDE_DIR})
target_link_libraries(${target_name} PUBLIC c-ares)
endif()

target_include_directories(${target_name} PUBLIC ${OPENSSL_INCLUDE_DIR})
Expand Down

0 comments on commit fb0ff3f

Please sign in to comment.