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(DFILTER_PUBLIC_HEADERS
|
|
|
|
dfilter.h
|
|
|
|
drange.h
|
|
|
|
)
|
|
|
|
|
2019-01-01 17:17:55 +00:00
|
|
|
set(DFILTER_HEADER_FILES
|
|
|
|
${DFILTER_PUBLIC_HEADERS}
|
|
|
|
dfilter-int.h
|
|
|
|
dfilter-macro.h
|
|
|
|
dfilter.h
|
|
|
|
dfunctions.h
|
|
|
|
dfvm.h
|
|
|
|
drange.h
|
|
|
|
gencode.h
|
|
|
|
semcheck.h
|
|
|
|
sttype-function.h
|
|
|
|
sttype-range.h
|
|
|
|
sttype-set.h
|
|
|
|
sttype-test.h
|
|
|
|
syntax-tree.h
|
|
|
|
)
|
|
|
|
|
2018-02-16 03:38:36 +00:00
|
|
|
set(DFILTER_NONGENERATED_FILES
|
2016-02-22 06:21:53 +00:00
|
|
|
dfilter.c
|
|
|
|
dfilter-macro.c
|
|
|
|
dfunctions.c
|
|
|
|
dfvm.c
|
|
|
|
drange.c
|
|
|
|
gencode.c
|
|
|
|
semcheck.c
|
|
|
|
sttype-function.c
|
|
|
|
sttype-integer.c
|
|
|
|
sttype-pointer.c
|
|
|
|
sttype-range.c
|
|
|
|
sttype-set.c
|
|
|
|
sttype-string.c
|
|
|
|
sttype-test.c
|
|
|
|
syntax-tree.c
|
|
|
|
)
|
2018-02-16 03:38:36 +00:00
|
|
|
source_group(dfilter FILES ${DFILTER_NONGENERATED_FILES})
|
2016-02-22 06:21:53 +00:00
|
|
|
|
2018-02-16 03:38:36 +00:00
|
|
|
set(DFILTER_FILES ${DFILTER_NONGENERATED_FILES})
|
2016-02-22 06:21:53 +00:00
|
|
|
|
2018-02-16 03:38:36 +00:00
|
|
|
add_lex_files(LEX_FILES DFILTER_FILES
|
2016-02-22 06:21:53 +00:00
|
|
|
scanner.l
|
|
|
|
)
|
|
|
|
|
2018-02-16 03:38:36 +00:00
|
|
|
add_lemon_files(LEMON_FILES DFILTER_FILES
|
2016-02-22 06:21:53 +00:00
|
|
|
grammar.lemon
|
|
|
|
)
|
|
|
|
|
2018-02-16 03:38:36 +00:00
|
|
|
#
|
2018-09-09 17:22:46 +00:00
|
|
|
# We don't enable -Werror on generated code to make the build a
|
|
|
|
# little less fragile when configured warnings change.
|
2018-02-16 03:38:36 +00:00
|
|
|
#
|
|
|
|
set_source_files_properties(
|
2018-09-09 17:22:46 +00:00
|
|
|
${DFILTER_NONGENERATED_FILES}
|
2018-02-16 03:38:36 +00:00
|
|
|
PROPERTIES
|
|
|
|
COMPILE_FLAGS "${WERROR_COMMON_FLAGS}"
|
2016-02-22 06:21:53 +00:00
|
|
|
)
|
|
|
|
|
2019-01-01 17:17:55 +00:00
|
|
|
add_library(dfilter OBJECT
|
|
|
|
|
|
|
|
#Included so that Visual Studio can properly put header files in solution
|
|
|
|
${DFILTER_HEADER_FILES}
|
|
|
|
|
|
|
|
${DFILTER_FILES}
|
|
|
|
)
|
2018-02-16 03:38:36 +00:00
|
|
|
|
2021-02-17 02:04:59 +00:00
|
|
|
target_include_directories(dfilter
|
|
|
|
PRIVATE
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}
|
|
|
|
${CMAKE_SOURCE_DIR}/epan
|
|
|
|
${CMAKE_SOURCE_DIR}/tools/lemon
|
|
|
|
)
|
|
|
|
|
2016-02-22 06:21:53 +00:00
|
|
|
set_target_properties(dfilter PROPERTIES
|
|
|
|
FOLDER "Libs/epan/dfilter"
|
|
|
|
COMPILE_DEFINITIONS "WS_BUILD_DLL"
|
|
|
|
)
|
|
|
|
|
2018-11-23 20:39:48 +00:00
|
|
|
install(FILES ${DFILTER_PUBLIC_HEADERS}
|
2019-02-01 16:25:24 +00:00
|
|
|
DESTINATION "${PROJECT_INSTALL_INCLUDEDIR}/epan/dfilter"
|
2018-11-23 20:39:48 +00:00
|
|
|
)
|
2017-09-02 23:42:00 +00:00
|
|
|
|
2016-03-11 19:51:39 +00:00
|
|
|
CHECKAPI(
|
|
|
|
NAME
|
|
|
|
dfilter
|
|
|
|
SWITCHES
|
|
|
|
SOURCES
|
2018-02-16 03:38:36 +00:00
|
|
|
${DFILTER_NONGENERATED_FILES}
|
2016-03-11 19:51:39 +00:00
|
|
|
# LEX files commented out due to use of malloc, free etc.
|
|
|
|
# ${LEX_FILES}
|
|
|
|
${LEMON_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:
|
|
|
|
#
|