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