@ -94,17 +94,8 @@ find_library(LIBMBEDCRYPTO libmbedcrypto.a)
find_library ( LIBEV libev.a )
find_library ( LIBUDNS libcares.a )
find_library ( LIBPCRE libpcre.a )
endif ( )
find_library ( LIBSODIUM_SHARED sodium )
find_library ( LIBMBEDTLS_SHARED mbedtls )
find_library ( LIBMBEDCRYPTO_SHARED mbedcrypto )
find_library ( LIBEV_SHARED ev )
find_library ( LIBUDNS_SHARED cares )
find_library ( LIBPCRE_SHARED pcre )
# D e p e n d e n c i e s w e n e e d f o r s t a t i c a n d s h a r e d
if ( WITH_STATIC )
list ( APPEND DEPS
m
b l o o m
@ -117,9 +108,19 @@ list(APPEND DEPS
)
endif ( )
find_library ( LIBSODIUM_SHARED sodium )
find_library ( LIBMBEDTLS_SHARED mbedtls )
find_library ( LIBMBEDCRYPTO_SHARED mbedcrypto )
find_library ( LIBEV_SHARED ev )
find_library ( LIBUDNS_SHARED cares )
find_library ( LIBPCRE_SHARED pcre )
if ( WITH_EMBEDDED_SRC )
list ( APPEND DEPS_SHARED
m
b l o o m - s h a r e d
c o r k - s h a r e d
i p s e t - s h a r e d
$ { L I B E V _ S H A R E D }
$ { L I B U D N S _ S H A R E D }
$ { L I B P C R E _ S H A R E D }
@ -127,6 +128,23 @@ list(APPEND DEPS_SHARED
$ { L I B M B E D T L S _ S H A R E D }
$ { L I B M B E D C R Y P T O _ S H A R E D }
)
else ( )
find_library ( LIBBLOOM_SHARED bloom )
find_library ( LIBCORK_SHARED cork )
find_library ( LIBCORKIPSET_SHARED corkipset )
list ( APPEND DEPS_SHARED
m
$ { L I B B L O O M _ S H A R E D }
$ { L I B C O R K _ S H A R E D }
$ { L I B C O R K I P S E T _ S H A R E D }
$ { L I B E V _ S H A R E D }
$ { L I B U D N S _ S H A R E D }
$ { L I B P C R E _ S H A R E D }
$ { L I B S O D I U M _ S H A R E D }
$ { L I B M B E D T L S _ S H A R E D }
$ { L I B M B E D C R Y P T O _ S H A R E D }
)
endif ( )
find_package ( Threads )
@ -184,12 +202,12 @@ target_compile_definitions(ss-local-shared PUBLIC -DMODULE_LOCAL)
target_compile_definitions ( ss-redir-shared PUBLIC -DMODULE_REDIR )
target_compile_definitions ( shadowsocks-libev-shared PUBLIC -DMODULE_LOCAL )
target_link_libraries ( ss-server-shared cork-shared ipset-shared ${ DEPS_SHARED } )
target_link_libraries ( ss-tunnel-shared cork-shared ${ DEPS_SHARED } )
target_link_libraries ( ss-manager-shared m bloom-shared cork-shared ${ CMAKE_THREAD_LIBS_INIT } ${ LIBEV_SHARED } ${ LIBUDNS_SHARED } )
target_link_libraries ( ss-local-shared cork-shared ipset-shared ${ DEPS_SHARED } )
target_link_libraries ( ss-redir-shared cork-shared ipset-shared ${ DEPS_SHARED } )
target_link_libraries ( shadowsocks-libev-shared cork-shared ipset-shared ${ DEPS_SHARED } )
target_link_libraries ( ss-server-shared ${ DEPS_SHARED } )
target_link_libraries ( ss-tunnel-shared ${ DEPS_SHARED } )
target_link_libraries ( ss-manager-shared ${ CMAKE_THREAD_LIBS_INIT } ${ LIBEV_SHARED } ${ LIBUDNS_SHARED } ${ DEP S_SHARED } )
target_link_libraries ( ss-local-shared ${ DEPS_SHARED } )
target_link_libraries ( ss-redir-shared ${ DEPS_SHARED } )
target_link_libraries ( shadowsocks-libev-shared ${ DEPS_SHARED } )
set_target_properties ( ss-server-shared PROPERTIES OUTPUT_NAME ss-server )
set_target_properties ( ss-tunnel-shared PROPERTIES OUTPUT_NAME ss-tunnel )
@ -204,7 +222,7 @@ set_target_properties(ss-server-shared ss-tunnel-shared ss-manager-shared ss-loc
set_target_properties ( shadowsocks-libev-shared PROPERTIES OUTPUT_NAME shadowsocks-libev )
target_compile_definitions ( shadowsocks-libev-shared PUBLIC -DMODULE_LOCAL )
target_link_libraries ( shadowsocks-libev-shared cork-shared ipset-shared ${ DEPS_SHARED } )
target_link_libraries ( shadowsocks-libev-shared ${ DEPS_SHARED } )
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# M i s c