Refactor plugin registration and loading
[metze/wireshark/wip.git] / plugins / transum / CMakeLists.txt
1 # CMakeLists.txt
2 #
3 # Wireshark - Network traffic analyzer
4 # By Gerald Combs <gerald@wireshark.org>
5 # Copyright 1998 Gerald Combs
6 #
7 # This program is free software; you can redistribute it and/or
8 # modify it under the terms of the GNU General Public License
9 # as published by the Free Software Foundation; either version 2
10 # of the License, or (at your option) any later version.
11 #
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 # GNU General Public License for more details.
16 #
17 # You should have received a copy of the GNU General Public License
18 # along with this program; if not, write to the Free Software
19 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20 #
21
22 include(WiresharkPlugin)
23
24 # Plugin name and version info (major minor micro extra)
25 set_module_info(transum 2 0 4 0)
26
27 set(DISSECTOR_SRC
28         packet-transum.c
29 )
30
31 set(DISSECTOR_SUPPORT_SRC
32         decoders.c
33         extractors.c
34 )
35
36 set(PLUGIN_FILES
37         plugin.c
38         ${DISSECTOR_SRC}
39         ${DISSECTOR_SUPPORT_SRC}
40 )
41
42 set(CLEAN_FILES
43         ${PLUGIN_FILES}
44 )
45
46 set_source_files_properties(
47         ${CLEAN_FILES}
48         PROPERTIES
49         COMPILE_FLAGS "${WERROR_COMMON_FLAGS}"
50 )
51
52 include_directories(${CMAKE_CURRENT_SOURCE_DIR})
53
54 register_plugin_files(plugin.c
55         plugin
56         ${DISSECTOR_SRC}
57         ${DISSECTOR_SUPPORT_SRC}
58 )
59
60 add_plugin_library(transum epan)
61
62 install_plugin(transum epan)
63
64 file(GLOB DISSECTOR_HEADERS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "*.h")
65 CHECKAPI(
66         NAME
67           transum
68         SWITCHES
69           -g abort -g termoutput -build
70         SOURCES
71           ${DISSECTOR_SRC}
72           ${DISSECTOR_SUPPORT_SRC}
73           ${DISSECTOR_HEADERS}
74 )
75
76 #
77 # Editor modelines  -  http://www.wireshark.org/tools/modelines.html
78 #
79 # Local variables:
80 # c-basic-offset: 8
81 # tab-width: 8
82 # indent-tabs-mode: t
83 # End:
84 #
85 # vi: set shiftwidth=8 tabstop=8 noexpandtab:
86 # :indentSize=8:tabSize=8:noTabs=false:
87 #