-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
106 lines (89 loc) · 3.45 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
#------------------------------------------------------------------------------
# General Settings
#------------------------------------------------------------------------------
cmake_minimum_required(VERSION 3.10)
project(tork)
set(CMAKE_CXX_STANDARD 17)
set(THREADS_PREFER_PTHREAD_FLAG ON)
set(CMAKE_VERBOSE_MAKEFILE OFF)
set(CMAKE_BUILD_FILES_DIRECTORY ${PROJECT_SOURCE_DIR}/build/)
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/build/)
#add_compile_options(-Wall)
#------------------------------------------------------------------------------
# Check Dependencies
#------------------------------------------------------------------------------
find_package(Threads REQUIRED)
find_package(Boost REQUIRED COMPONENTS system filesystem unit_test_framework)
find_package(OpenSSL REQUIRED)
#------------------------------------------------------------------------------
# Includes
#------------------------------------------------------------------------------
include_directories("${PROJECT_SOURCE_DIR}/src")
#------------------------------------------------------------------------------
# Executables and Libraries
#------------------------------------------------------------------------------
add_executable(${PROJECT_NAME}
src/tork.cc
)
add_executable(cli
src/cli.cc
)
add_executable(testk
src/test.cc
)
add_library(torkl
src/cli/CliUnixClient.hh
src/cli/CliUnixClient.cc
src/cli/CliUnixServer.hh
src/cli/CliUnixServer.cc
src/tordriver/TorPT.hh
src/tordriver/TorPT.cc
src/tordriver/TorPTClient.hh
src/tordriver/TorPTClient.cc
src/tordriver/TorPTServer.hh
src/tordriver/TorPTServer.cc
src/tordriver/TorController.hh
src/tordriver/TorController.cc
src/tordriver/SocksProxyClient.hh
src/tordriver/SocksProxyClient.cc
src/tordriver/SocksProxyServer.hh
src/tordriver/SocksProxyServer.cc
src/controller/Controller.hh
src/controller/ControllerClient.hh
src/controller/ControllerClient.cc
src/controller/ControllerServer.hh
src/controller/ControllerServer.cc
src/controller/FdPair.hh
src/controller/Frame.hh
src/controller/Frame.cc
src/controller/FramePool.hh
src/controller/FramePool.cc
src/controller/FrameQueue.hh
src/controller/FrameQueue.cc
src/controller/TrafficShaper.hh
src/controller/TrafficShaper.cc
src/controller/ClientManager.hh
src/controller/ClientManager.cc
src/controller/Client.hh
src/common/Common.hh
src/common/Common.cc
src/common/cmdline.h
src/common/RingBuffer.hh
src/common/RingBuffer.cc
src/common/SSL.hh
)
#------------------------------------------------------------------------------
# Definitions
#------------------------------------------------------------------------------
add_definitions(-DBOOST_LOG_DYN_LINK)
#------------------------------------------------------------------------------
# Dependencies
#------------------------------------------------------------------------------
target_link_libraries(${PROJECT_NAME} torkl)
target_link_libraries(${PROJECT_NAME} ${Boost_LIBRARIES})
target_link_libraries(${PROJECT_NAME} Threads::Threads)
target_link_libraries(${PROJECT_NAME} ssl)
target_link_libraries(${PROJECT_NAME} crypto)
target_link_libraries(cli torkl)
target_link_libraries(testk torkl)
target_link_libraries(testk Threads::Threads)