-
Notifications
You must be signed in to change notification settings - Fork 21
/
CMakeLists.txt
53 lines (40 loc) · 1.24 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
cmake_minimum_required(VERSION 3.20)
if(WIN32)
set (WINVER "0x0601" CACHE STRING "Value for _WIN32_WINNT")
add_definitions(-D_WIN32_WINNT=${WINVER})
endif()
project(shinysocks
DESCRIPTION "Socks Proxy server"
HOMEPAGE_URL https://github.com/jgaa/shinysocks
VERSION 1.3.4
LANGUAGES CXX
)
add_definitions(-DSHINYSOCKS_VERSION=\"${CMAKE_PROJECT_VERSION}\")
include(cmake/3rdparty.cmake)
find_package(Threads REQUIRED)
if(NOT DEFINED USE_BOOST_VERSION)
set(USE_BOOST_VERSION 1.69)
endif()
find_package(Boost ${USE_BOOST_VERSION} REQUIRED COMPONENTS
system
program_options
serialization
coroutine
context
)
add_executable(${PROJECT_NAME} Manager.cpp Listener.cpp Proxy.cpp main.cpp shinysocks.h logging.h)
add_dependencies(${PROJECT_NAME} logfault)
include_directories(${Boost_INCLUDE_DIR})
set_target_properties(${PROJECT_NAME}
PROPERTIES
CXX_STANDARD 17
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin"
)
target_link_libraries(${PROJECT_NAME}
PRIVATE
${Boost_LIBRARIES}
$<BUILD_INTERFACE:Threads::Threads>
)
install(TARGETS shinysocks RUNTIME DESTINATION bin)