CMake:
[obnox/wireshark/wip.git] / plugins / docsis / CMakeLists.txt
1 # CMakeLists.txt
2 #
3 # $Id$
4 #
5 # Wireshark - Network traffic analyzer
6 # By Gerald Combs <gerald@wireshark.org>
7 # Copyright 1998 Gerald Combs
8 #
9 # This program is free software; you can redistribute it and/or
10 # modify it under the terms of the GNU General Public License
11 # as published by the Free Software Foundation; either version 2
12 # of the License, or (at your option) any later version.
13 #
14 # This program is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 # GNU General Public License for more details.
18 #
19 # You should have received a copy of the GNU General Public License
20 # along with this program; if not, write to the Free Software
21 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
22 #
23
24 set(DISSECTOR_SRC
25         packet-bintrngreq.c
26         packet-bpkmattr.c
27         packet-bpkmreq.c
28         packet-bpkmrsp.c
29         packet-intrngreq.c
30         packet-dccack.c
31         packet-dccreq.c
32         packet-dccrsp.c
33         packet-dcd.c
34         packet-docsis.c
35         packet-dsaack.c
36         packet-dsareq.c
37         packet-dsarsp.c
38         packet-dscack.c
39         packet-dscreq.c
40         packet-dscrsp.c
41         packet-dsdreq.c
42         packet-dsdrsp.c
43         packet-macmgmt.c
44         packet-map.c
45         packet-mdd.c
46         packet-regack.c
47         packet-regreq.c
48         packet-regreqmp.c
49         packet-regrsp.c
50         packet-regrspmp.c
51         packet-rngreq.c
52         packet-rngrsp.c
53         packet-sync.c
54         packet-tlv.c
55         packet-type29ucd.c
56         packet-uccreq.c
57         packet-uccrsp.c
58         packet-ucd.c
59         packet-vendor.c
60 )
61
62 set(PLUGIN_FILES
63         plugin.c
64         ${DISSECTOR_SRC}
65 )
66
67 include_directories(${CMAKE_CURRENT_SOURCE_DIR})
68
69 ADD_CUSTOM_COMMAND(
70 # FIXME: Only the Python stuff has been implemented
71 #        Make this into a MACRO, to avoid duplication with epan/
72 #plugin.c: $(DISSECTOR_SRC) $(top_srcdir)/tools/make-dissector-reg \
73 #    $(top_srcdir)/tools/make-dissector-reg.py
74 #        @if test -n "$(PYTHON)"; then \
75 #                echo Making plugin.c with python ; \
76 #                $(PYTHON) $(top_srcdir)/tools/make-dissector-reg.py $(srcdir) \
77 #                    plugin $(DISSECTOR_SRC) ; \
78 #        else \
79 #                echo Making plugin.c with shell script ; \
80 #                $(top_srcdir)/tools/make-dissector-reg $(srcdir) \
81 #                    $(plugin_src) plugin $(DISSECTOR_SRC) ; \
82 #        fi
83
84     OUTPUT plugin.c
85     COMMAND ${PYTHON_EXECUTABLE}
86       ${CMAKE_SOURCE_DIR}/tools/make-dissector-reg.py
87       ${CMAKE_CURRENT_SOURCE_DIR}
88       plugin
89       ${DISSECTOR_SRC}
90     DEPENDS
91       ${DISSECTOR_SRC}
92       ${CMAKE_SOURCE_DIR}/tools/make-dissector-reg
93       ${CMAKE_SOURCE_DIR}/tools/make-dissector-reg.py
94 )
95
96 # todo
97 # Do I need any of this or is this handled by type MODULE?
98 # asn1_la_LDFLAGS = -module -avoid-version
99
100 add_library(docsis MODULE
101         ${PLUGIN_FILES}
102 )
103
104 install(TARGETS docsis
105         LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION}
106         RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION}
107         ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION}
108 )
109