2016-02-22 06:21:53 +00:00
|
|
|
# CMakeLists.txt
|
|
|
|
#
|
|
|
|
# Wireshark - Network traffic analyzer
|
|
|
|
# By Gerald Combs <gerald@wireshark.org>
|
|
|
|
# Copyright 1998 Gerald Combs
|
|
|
|
#
|
2018-03-06 14:31:02 +00:00
|
|
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
2016-02-22 06:21:53 +00:00
|
|
|
#
|
|
|
|
|
2017-09-02 23:42:00 +00:00
|
|
|
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
|
|
|
|
)
|
|
|
|
|
2019-01-01 17:17:55 +00:00
|
|
|
set(WMEM_HEADER_FILES
|
|
|
|
${WMEM_PUBLIC_HEADERS}
|
|
|
|
wmem_allocator.h
|
|
|
|
wmem_allocator_block.h
|
|
|
|
wmem_allocator_block_fast.h
|
|
|
|
wmem_allocator_simple.h
|
|
|
|
wmem_allocator_strict.h
|
|
|
|
wmem_interval_tree.h
|
|
|
|
wmem_map_int.h
|
|
|
|
wmem_tree-int.h
|
|
|
|
wmem_user_cb_int.h
|
|
|
|
)
|
|
|
|
|
2016-02-22 06:21:53 +00:00
|
|
|
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})
|
|
|
|
|
2016-09-30 14:06:15 +00:00
|
|
|
set_source_files_properties(
|
|
|
|
${WMEM_FILES}
|
|
|
|
PROPERTIES
|
|
|
|
COMPILE_FLAGS "${WERROR_COMMON_FLAGS}"
|
|
|
|
)
|
2016-02-22 06:21:53 +00:00
|
|
|
|
|
|
|
add_library(wmem OBJECT
|
2019-01-01 17:17:55 +00:00
|
|
|
#Included so that Visual Studio can properly put header files in solution
|
|
|
|
${WMEM_HEADER_FILES}
|
|
|
|
|
2016-02-22 06:21:53 +00:00
|
|
|
${WMEM_FILES}
|
|
|
|
)
|
|
|
|
|
2021-02-17 02:04:59 +00:00
|
|
|
target_include_directories(wmem
|
|
|
|
PRIVATE
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}
|
|
|
|
)
|
|
|
|
|
2016-02-22 06:21:53 +00:00
|
|
|
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>)
|
|
|
|
|
2016-04-07 22:31:21 +00:00
|
|
|
target_link_libraries(wmem_test ${GLIB2_LIBRARIES} wsutil)
|
2016-02-22 06:21:53 +00:00
|
|
|
|
|
|
|
set_target_properties(wmem_test PROPERTIES
|
|
|
|
FOLDER "Tests"
|
2018-03-12 22:06:56 +00:00
|
|
|
EXCLUDE_FROM_DEFAULT_BUILD True
|
2016-02-22 06:21:53 +00:00
|
|
|
COMPILE_DEFINITIONS "WS_BUILD_DLL"
|
|
|
|
)
|
|
|
|
|
2018-11-23 20:39:48 +00:00
|
|
|
install(FILES ${WMEM_PUBLIC_HEADERS}
|
2019-02-01 16:25:24 +00:00
|
|
|
DESTINATION "${PROJECT_INSTALL_INCLUDEDIR}/epan/wmem"
|
2018-11-23 20:39:48 +00:00
|
|
|
)
|
2017-09-02 23:42:00 +00:00
|
|
|
|
2016-05-13 15:03:55 +00:00
|
|
|
CHECKAPI(
|
|
|
|
NAME
|
|
|
|
wmem
|
|
|
|
SWITCHES
|
|
|
|
SOURCES
|
|
|
|
${WMEM_FILES}
|
|
|
|
)
|
|
|
|
|
2016-02-22 06:21:53 +00:00
|
|
|
#
|
2019-07-26 18:43:17 +00:00
|
|
|
# Editor modelines - https://www.wireshark.org/tools/modelines.html
|
2016-02-22 06:21:53 +00:00
|
|
|
#
|
|
|
|
# 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:
|
|
|
|
#
|