-
Notifications
You must be signed in to change notification settings - Fork 19
/
CMakeLists.txt
54 lines (44 loc) · 1.08 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
cmake_minimum_required (VERSION 3.2.2)
project("FileTransfer" CXX)
SET(CMAKE_CXX_STANDARD 11)
SET(CMAKE_CXX_STANDARD_REQUIRED ON)
SET(Boost_USE_MULTITHREAD ON)
FIND_PACKAGE(Boost 1.58.0 REQUIRED COMPONENTS log_setup log system thread)
add_executable(client Client/main.cpp Client/client.cpp Common/logger.cpp)
target_include_directories(client
PUBLIC
${Boost_INCLUDE_DIRS}
"${CMAKE_CURRENT_SOURCE_DIR}/Client"
"${CMAKE_CURRENT_SOURCE_DIR}/Common"
)
target_link_libraries(client
PUBLIC
Boost::log_setup
Boost::log
Boost::system
Boost::thread
Boost::filesystem
)
target_compile_options(client
PUBLIC
-DBOOST_LOG_DYN_LINK
)
add_executable(server Server/main.cpp Server/server.cpp Common/logger.cpp)
target_include_directories(server
PUBLIC
${Boost_INCLUDE_DIRS}
"${CMAKE_CURRENT_SOURCE_DIR}/Server"
"${CMAKE_CURRENT_SOURCE_DIR}/Common"
)
target_link_libraries(server
PUBLIC
Boost::log_setup
Boost::log
Boost::system
Boost::thread
Boost::filesystem
)
target_compile_options(server
PUBLIC
-DBOOST_LOG_DYN_LINK
)