forked from wireshark/wireshark
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
59 lines (50 loc) · 1 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
# CMakeLists.txt
#
# Wireshark - Network traffic analyzer
# By Gerald Combs <[email protected]>
# Copyright 1998 Gerald Combs
#
# SPDX-License-Identifier: GPL-2.0-or-later
#
set(WRITECAP_SRC
${CMAKE_SOURCE_DIR}/wiretap/file_wrappers.c
pcapio.c
)
if(WIN32)
list(APPEND WRITECAP_SRC
${CMAKE_SOURCE_DIR}/wsutil/file_util.c
)
endif()
set_source_files_properties(
${WRITECAP_SRC}
PROPERTIES
COMPILE_FLAGS "${WERROR_COMMON_FLAGS}"
)
add_library(writecap STATIC
${WRITECAP_SRC}
)
set_target_properties(writecap PROPERTIES
LINK_FLAGS "${WS_LINK_FLAGS}"
FOLDER "Libs"
)
target_compile_definitions(writecap
PRIVATE
# Necessary to avoid C4273 inconsistent DLL linkage on MSVC
ENABLE_STATIC
)
target_link_libraries(writecap
PRIVATE
${GMODULE2_LIBRARIES}
${LZ4_LIBRARIES}
${ZLIB_LIBRARIES}
${ZLIBNG_LIBRARIES}
${ZSTD_LIBRARIES}
${WIN_WS2_32_LIBRARY}
)
target_include_directories(writecap SYSTEM
PRIVATE
${LZ4_INCLUDE_DIRS}
${ZLIB_INCLUDE_DIRS}
${ZLIBNG_INCLUDE_DIRS}
${ZSTD_INCLUDE_DIRS}
)