-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
42 lines (34 loc) · 1.15 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
cmake_minimum_required(VERSION 3.0.0)
project(pop3-client VERSION 1.0.0)
# specify the C++ standard
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED True)
# configure a header file to pass some of the CMake settings
# to the source code
configure_file(Config.h.in Config.h)
include(CTest)
enable_testing()
# add Pop3Session library
add_subdirectory(lib/Pop3Session)
# add Base 64 library
add_subdirectory(lib/Base64Codec)
# add Socket library
add_subdirectory(lib/Socket)
# add Error library
add_subdirectory(lib/Error)
add_executable(pop3-client main.cpp)
target_link_libraries(pop3-client PUBLIC Pop3Session)
target_link_libraries(pop3-client PUBLIC Base64Codec)
target_link_libraries(pop3-client PUBLIC Socket)
target_link_libraries(pop3-client PUBLIC Error)
set(CPACK_PROJECT_NAME ${PROJECT_NAME})
set(CPACK_PROJECT_VERSION ${PROJECT_VERSION})
include(CPack)
# add the binary tree to the search path for include files
target_include_directories(pop3-client PUBLIC
"${PROJECT_BINARY_DIR}"
"${PROJECT_SOURCE_DIR}/lib/Pop3Session"
"${PROJECT_SOURCE_DIR}/lib/Socket"
"${PROJECT_SOURCE_DIR}/lib/Error"
"${PROJECT_SOURCE_DIR}/lib/Base64Codec"
)