From 4913978a589dbe5dc3a535939491f9adb5b6cd28 Mon Sep 17 00:00:00 2001 From: ideal Date: Sun, 10 Mar 2019 18:43:42 +0800 Subject: [PATCH 1/3] cmake: put pkgconfig file into lib/pkgconfig --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 885e49a9..04982070 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -49,7 +49,7 @@ configure_file( ) install(FILES ${CMAKE_BINARY_DIR}/pkgconfig/shadowsocks-libev.pc - DESTINATION pkgconfig + DESTINATION lib/pkgconfig ) if (WITH_EMBEDDED_SRC) From 55647ce5f2281dbb83c6eabccb8fa6c429428edd Mon Sep 17 00:00:00 2001 From: ideal Date: Sun, 10 Mar 2019 18:50:50 +0800 Subject: [PATCH 2/3] define USE_SYSTEM_SHARED_LIB in config.h when cmake with -DWITH_EMBEDDED_SRC=OF set USE_SYSTEM_SHARED_LIB to TRUE to let cmakedefine take effect in cmake/config.h.cmake --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 04982070..6f061b67 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -35,6 +35,11 @@ option(WITH_EMBEDDED_SRC "build with embedded libcork, libipset, and libbloom so # Will set GIT_EXECUTABLE and GIT_FOUND # find_package(Git) +# When choose to not use embedded libcork, libipset and libboom, use libs shipped by system +if (NOT WITH_EMBEDDED_SRC) + set(USE_SYSTEM_SHARED_LIB TRUE) +endif () + # Run platform tests include(${CMAKE_SOURCE_DIR}/cmake/configure.cmake) configure_file(${CMAKE_SOURCE_DIR}/cmake/config.h.cmake ${CMAKE_BINARY_DIR}/src/config.h) From 5c0b8d2ab4db4a480ea6edec903c486635f4520f Mon Sep 17 00:00:00 2001 From: ideal Date: Sun, 10 Mar 2019 19:00:00 +0800 Subject: [PATCH 3/3] cmake: let version available in config.h --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6f061b67..01961e85 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,7 +6,7 @@ set(PROJECT_VERSION "3.2.5") set(PROJECT_DESC "a lightweight secured socks5 proxy") set(PROJECT_URL "https://shadowsocks.org") set(PROJECT_ISSUES_URL "https://github.com/shadowsocks/shadowsocks-libev") -project(${PROJECT_NAME}) +project(${PROJECT_NAME} VERSION ${PROJECT_VERSION}) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99")