-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
32 lines (25 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
cmake_minimum_required(VERSION 2.8)
project(tcpcapture)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/lib)
include_directories(${PROJECT_SOURCE_DIR}/include)
include_directories(${PROJECT_SOURCE_DIR}/thirdparh/spdlog/include)
if(WIN32)
include_directories(${PROJECT_SOURCE_DIR}/thirdparh/winpcap/include)
include_directories(${PROJECT_SOURCE_DIR}/thirdparh/winpcapplusplus/include)
link_directories(${PROJECT_SOURCE_DIR}/thirdparh/winpcap/lib64)
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
# Debug 模式
link_directories(${PROJECT_SOURCE_DIR}/thirdparh/winpcapplusplus/lib64/debug)
else()
link_directories(${PROJECT_SOURCE_DIR}/thirdparh/winpcapplusplus/lib64/release)
endif()
elseif(UNIX)
include_directories(${PROJECT_SOURCE_DIR}/thirdparh/pcap/include)
include_directories(${PROJECT_SOURCE_DIR}/thirdparh/pcapplusplus/include)
link_directories(${PROJECT_SOURCE_DIR}/thirdparh/pacp/lib)
link_directories(${PROJECT_SOURCE_DIR}/thirdparh/pcapplusplus/lib64)
endif ()
add_subdirectory(src)
add_subdirectory(plugins)