Skip to content

Commit f63fa13

Browse files
committed
Statically linking boost libraries
Changed version to 1.4.0
1 parent ca331f5 commit f63fa13

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

CMakeLists.txt

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,12 @@ endif()
88
project(shinysocks
99
DESCRIPTION "Socks Proxy server"
1010
HOMEPAGE_URL https://github.com/jgaa/shinysocks
11-
VERSION 1.3.5
11+
VERSION 1.4.0
1212
LANGUAGES CXX
1313
)
1414

15+
option(USE_STATIC_BOOST "Link Boost statically" ON)
16+
1517
add_definitions(-DSHINYSOCKS_VERSION=\"${CMAKE_PROJECT_VERSION}\")
1618

1719
include(cmake/3rdparty.cmake)
@@ -22,17 +24,19 @@ if(NOT DEFINED USE_BOOST_VERSION)
2224
set(USE_BOOST_VERSION 1.69)
2325
endif()
2426

27+
if(USE_STATIC_BOOST)
28+
set(Boost_USE_STATIC_LIBS ON)
29+
endif()
30+
2531
find_package(Boost ${USE_BOOST_VERSION} REQUIRED COMPONENTS
2632
system
2733
program_options
2834
serialization
2935
coroutine
3036
context
3137
)
32-
3338
add_executable(${PROJECT_NAME} Manager.cpp Listener.cpp Proxy.cpp main.cpp shinysocks.h logging.h)
3439
add_dependencies(${PROJECT_NAME} logfault)
35-
3640
include_directories(${Boost_INCLUDE_DIR})
3741

3842
set_target_properties(${PROJECT_NAME}

0 commit comments

Comments
 (0)