File: CMakeLists.txt

package info (click to toggle)
wireshark 4.6.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 351,244 kB
  • sloc: ansic: 3,101,885; cpp: 129,710; xml: 100,972; python: 56,512; perl: 24,575; sh: 5,874; lex: 4,383; pascal: 4,304; makefile: 165; ruby: 113; objc: 91; tcl: 35
file content (59 lines) | stat: -rw-r--r-- 1,028 bytes parent folder | download
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 <gerald@wireshark.org>
# 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}
)