From Guido Reismueller:
[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-cmctrlreq.c
30         packet-cmctrlrsp.c
31         packet-intrngreq.c
32         packet-dbcreq.c
33         packet-dbcrsp.c
34         packet-dbcack.c
35         packet-dccack.c
36         packet-dccreq.c
37         packet-dccrsp.c
38         packet-dcd.c
39         packet-dpvreq.c
40         packet-dpvrsp.c
41         packet-docsis.c
42         packet-dsaack.c
43         packet-dsareq.c
44         packet-dsarsp.c
45         packet-dscack.c
46         packet-dscreq.c
47         packet-dscrsp.c
48         packet-dsdreq.c
49         packet-dsdrsp.c
50         packet-macmgmt.c
51         packet-map.c
52         packet-mdd.c
53         packet-regack.c
54         packet-regreq.c
55         packet-regreqmp.c
56         packet-regrsp.c
57         packet-regrspmp.c
58         packet-rngreq.c
59         packet-rngrsp.c
60         packet-sync.c
61         packet-tlv.c
62         packet-tlv-cmctrl.c
63         packet-type29ucd.c
64         packet-uccreq.c
65         packet-uccrsp.c
66         packet-ucd.c
67         packet-vendor.c
68 )
69
70 set(PLUGIN_FILES
71         plugin.c
72         ${DISSECTOR_SRC}
73 )
74
75 set(CLEAN_FILES
76         ${PLUGIN_FILES}
77 )
78
79 if (WERROR)
80         set_source_files_properties(
81                 ${CLEAN_FILES}
82                 PROPERTIES
83                 COMPILE_FLAGS -Werror
84         )
85 endif()
86
87 include_directories(${CMAKE_CURRENT_SOURCE_DIR})
88
89 register_dissector_files(plugin.c
90         plugin
91         ${DISSECTOR_SRC}
92 )
93
94 add_library(docsis ${LINK_MODE_MODULE}
95         ${PLUGIN_FILES}
96 )
97 set_target_properties(docsis PROPERTIES PREFIX "")
98 set_target_properties(docsis PROPERTIES LINK_FLAGS "${WS_LINK_FLAGS}")
99
100 target_link_libraries(docsis epan)
101
102 install(TARGETS docsis
103         LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION} NAMELINK_SKIP
104         RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION}
105         ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION}
106 )
107