-
Notifications
You must be signed in to change notification settings - Fork 9
/
CMakeLists.txt
61 lines (47 loc) · 1.42 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
cmake_minimum_required(VERSION 3.16)
project (libflute VERSION 0.11.0)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED True)
set(CMAKE_CXX_FLAGS_DEBUG_INIT "-Wall -Wextra -Werror -g3")
set(CMAKE_CXX_FLAGS_RELEASE_INIT "-Wall -O3")
find_package(Boost REQUIRED)
find_package(spdlog REQUIRED)
find_package(PkgConfig REQUIRED)
find_package(OpenSSL REQUIRED)
pkg_check_modules(TINYXML REQUIRED IMPORTED_TARGET tinyxml2)
pkg_check_modules(NETLINK REQUIRED IMPORTED_TARGET libnl-3.0)
add_subdirectory(examples)
include_directories(
"${PROJECT_BINARY_DIR}"
${PROJECT_SOURCE_DIR}/include
SYSTEM
${PROJECT_SOURCE_DIR}/utils
${SPDLOG_INCLUDEDIR}
PkgConfig::NETLINK
)
configure_file("include/Version.h.in" "Version.h")
link_directories(
)
set(CMAKE_CXX_CLANG_TIDY clang-tidy)
add_library(flute "")
target_sources(flute
PRIVATE
src/Receiver.cpp src/Transmitter.cpp src/AlcPacket.cpp src/File.cpp src/EncodingSymbol.cpp src/FileDeliveryTable.cpp src/IpSec.cpp
utils/base64.cpp
PUBLIC
include/Receiver.h include/Transmitter.h include/File.h
)
target_include_directories(flute
PUBLIC
${CMAKE_CURRENT_LIST_DIR}/include/
)
#add_library(flute src/Receiver.cpp src/Receiver.h src/AlcPacket.cpp src/File.cpp src/EncodingSymbol.cpp src/FileDeliveryTable.cpp)
target_link_libraries( flute
LINK_PUBLIC
spdlog::spdlog
z
pthread
crypto
PkgConfig::TINYXML
PkgConfig::NETLINK
)