aboutsummaryrefslogtreecommitdiffstats
path: root/epan/wmem/CMakeLists.txt
blob: 2ff6d717d52aa59462cf90b17195d7066a85a8d2 (plain)
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# CMakeLists.txt
#
# Wireshark - Network traffic analyzer
# By Gerald Combs <gerald@wireshark.org>
# Copyright 1998 Gerald Combs
#
# SPDX-License-Identifier: GPL-2.0-or-later
#

include_directories(
	${CMAKE_CURRENT_BINARY_DIR}
	${CMAKE_CURRENT_SOURCE_DIR}
)

set(WMEM_PUBLIC_HEADERS
	wmem.h
	wmem_array.h
	wmem_core.h
	wmem_list.h
	wmem_map.h
	wmem_miscutl.h
	wmem_queue.h
	wmem_scopes.h
	wmem_stack.h
	wmem_strbuf.h
	wmem_strutl.h
	wmem_tree.h
	wmem_interval_tree.h
	wmem_user_cb.h
)

set(WMEM_FILES
	wmem_array.c
	wmem_core.c
	wmem_allocator_block.c
	wmem_allocator_block_fast.c
	wmem_allocator_simple.c
	wmem_allocator_strict.c
	wmem_interval_tree.c
	wmem_list.c
	wmem_map.c
	wmem_miscutl.c
	wmem_scopes.c
	wmem_stack.c
	wmem_strbuf.c
	wmem_strutl.c
	wmem_tree.c
	wmem_user_cb.c
)
source_group(wmem FILES ${WMEM_FILES})

set_source_files_properties(
	${WMEM_FILES}
	PROPERTIES
	COMPILE_FLAGS "${WERROR_COMMON_FLAGS}"
)

add_library(wmem OBJECT
	${WMEM_FILES}
)

set_target_properties(wmem PROPERTIES
	FOLDER "Libs/epan/wmem"
	COMPILE_DEFINITIONS "WS_BUILD_DLL"
)

add_executable(wmem_test EXCLUDE_FROM_ALL wmem_test.c $<TARGET_OBJECTS:wmem>)

target_link_libraries(wmem_test ${GLIB2_LIBRARIES} wsutil)

set_target_properties(wmem_test PROPERTIES
	FOLDER "Tests"
	EXCLUDE_FROM_DEFAULT_BUILD True
	COMPILE_DEFINITIONS "WS_BUILD_DLL"
)

install(FILES ${WMEM_PUBLIC_HEADERS}
	DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${CPACK_PACKAGE_NAME}/epan/wmem"
)

CHECKAPI(
	NAME
	  wmem
	SWITCHES
	  --group termoutput:1 --summary-group termoutput
	  --build
	SOURCES
	  ${WMEM_FILES}
)

#
# Editor modelines  -  http://www.wireshark.org/tools/modelines.html
#
# Local variables:
# c-basic-offset: 8
# tab-width: 8
# indent-tabs-mode: t
# End:
#
# vi: set shiftwidth=8 tabstop=8 noexpandtab:
# :indentSize=8:tabSize=8:noTabs=false:
#