mirror of
https://github.com/shadowsocks/shadowsocks-libev.git
synced 2026-10-20 21:43:41 +00:00
Rename the project to shadowsocks-c while retaining ss-* commands, the embedding ABI, and legacy library/package lookup compatibility.
Replace libev with bundled libuv for IOCP/kqueue event backends, expand asynchronous runtime DNS coverage, and add actionlint/Ruff with strict clang-tidy failure handling. Validate native platforms, static builds, packaging, interoperability, sanitizers, and canonical/legacy consumers.
All 22 hosted checks pass at reviewed head a8493250eb.
23 lines
1.1 KiB
CMake
23 lines
1.1 KiB
CMake
cmake_minimum_required(VERSION 3.20)
|
|
project(shadowsocks_consumer LANGUAGES C)
|
|
set(SS_PACKAGE_NAME shadowsocks-c CACHE STRING "Installed package to test")
|
|
find_package(${SS_PACKAGE_NAME} CONFIG REQUIRED)
|
|
foreach(kind shared static)
|
|
if(TARGET shadowsocks::${kind})
|
|
if(SS_PACKAGE_NAME STREQUAL "shadowsocks-libev")
|
|
# Exercise legacy filenames as well as legacy package discovery.
|
|
foreach(property IMPORTED_LOCATION IMPORTED_IMPLIB)
|
|
get_target_property(location shadowsocks::${kind} ${property})
|
|
if(location)
|
|
get_filename_component(directory "${location}" DIRECTORY)
|
|
get_filename_component(filename "${location}" NAME)
|
|
string(REPLACE "shadowsocks-c" "shadowsocks-libev" filename "${filename}")
|
|
set_property(TARGET shadowsocks::${kind} PROPERTY ${property} "${directory}/${filename}")
|
|
endif()
|
|
endforeach()
|
|
endif()
|
|
add_executable(consumer_${kind} main.c)
|
|
target_link_libraries(consumer_${kind} PRIVATE shadowsocks::${kind})
|
|
endif()
|
|
endforeach()
|