-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathCMakeLists.txt
48 lines (38 loc) · 1.54 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
cmake_minimum_required(VERSION 3.18.4)
project(deserter)
add_subdirectory(src)
add_subdirectory(external/PcapPlusPlus)
add_subdirectory(external/argparse)
add_subdirectory(external/signal)
set(CMAKE_CXX_STANDARD 17)
set(PACKETPP_LIB_PATH "${PROJECT_SOURCE_DIR}external/PcapPlusPlus/Packet++")
set(COMMONPP_LIB_PATH "${PROJECT_SOURCE_DIR}/external/PcapPlusPlus/Common++")
set(PCAPPP_LIB_PATH "${PROJECT_SOURCE_DIR}/external/PcapPlusPlus/Pcap++")
include_directories(
/include
/src
)
file(GLOB sources
"${PROJECT_SOURCE_DIR}/src/*.h"
"${PROJECT_SOURCE_DIR}/src/*.hpp"
"${PROJECT_SOURCE_DIR}/src/*.cpp"
"${PROJECT_SOURCE_DIR}/src/*.c"
)
add_executable(${PROJECT_NAME} ${sources})
target_include_directories(${PROJECT_NAME}
PUBLIC ${PACKETPP_LIB_PATH}/header
PUBLIC ${COMMONPP_LIB_PATH}/header
PUBLIC ${PCAPPP_LIB_PATH}/header
PUBLIC ${PROJECT_SOURCE_DIR}/external/argparse
PUBLIC ${PROJECT_SOURCE_DIR}/external/signal
)
target_link_directories(${PROJECT_NAME}
PRIVATE ${PACKETPP_LIB_PATH}/src
PRIVATE ${COMMONPP_LIB_PATH}/src
PRIVATE ${PCAPPP_LIB_PATH}/src
PRIVATE ${PROJECT_SOURCE_DIR}/build/external/PcapPlusPlus/lib
PRIVATE ${PROJECT_SOURCE_DIR}/build/external/PcapPlusPlus/3rdParty/LightPcapNg
PRIVATE ${PROJECT_SOURCE_DIR}/external/argparse
PRIVATE ${PROJECT_SOURCE_DIR}/external/signal
PRIVATE ${PROJECT_SOURCE_DIR}/src)
target_link_libraries(${PROJECT_NAME} CommonPP PacketPP PcapPP light_pcapng)