Browse Source

Recommend to use shared binary

pull/1329/merge
wener 7 years ago
committed by Max Lv
parent
commit
619ae880c9
2 changed files with 5 additions and 2 deletions
  1. 2
      CMakeLists.txt
  2. 5
      src/CMakeLists.txt

2
CMakeLists.txt

@ -19,6 +19,8 @@ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake)
set(RUNTIME_SHARED_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/shared/bin)
set(CMAKE_MACOSX_RPATH TRUE) set(CMAKE_MACOSX_RPATH TRUE)
if (NOT CMAKE_BUILD_TYPE) if (NOT CMAKE_BUILD_TYPE)

5
src/CMakeLists.txt

@ -188,7 +188,7 @@ set_target_properties(ss-redir-shared PROPERTIES OUTPUT_NAME ss-redir)
set_target_properties(ss-server-shared ss-tunnel-shared ss-manager-shared ss-local-shared ss-redir-shared set_target_properties(ss-server-shared ss-tunnel-shared ss-manager-shared ss-local-shared ss-redir-shared
PROPERTIES PROPERTIES
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/shared/bin"
RUNTIME_OUTPUT_DIRECTORY ${RUNTIME_SHARED_OUTPUT_DIRECTORY}
) )
set_target_properties(shadowsocks-libev-shared PROPERTIES OUTPUT_NAME shadowsocks-libev) set_target_properties(shadowsocks-libev-shared PROPERTIES OUTPUT_NAME shadowsocks-libev)
@ -197,7 +197,8 @@ target_link_libraries(shadowsocks-libev-shared cork-shared ipset-shared ${DEPS_S
# ------------------------------------------------------------------ # ------------------------------------------------------------------
# Misc # Misc
install(DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/
# Recommend to install shared by default
install(DIRECTORY ${RUNTIME_SHARED_OUTPUT_DIRECTORY}/
DESTINATION bin) DESTINATION bin)
install(DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/ install(DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/
DESTINATION lib) DESTINATION lib)

Loading…
Cancel
Save