Beginnings of enabling static builds. Still to do:
[obnox/wireshark/wip.git] / plugins / profinet / 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-dcerpc-pn-io.c
26         packet-dcom-cba.c
27         packet-dcom-cba-acco.c
28         packet-pn-dcp.c
29         packet-pn-mrp.c
30         packet-pn-mrrt.c
31         packet-pn-ptcp.c
32         packet-pn-rt.c
33 )
34
35 set(DISSECTOR_SUPPORT_SRC
36         packet-pn.c
37 )
38
39 set(PLUGIN_FILES
40         plugin.c
41         ${DISSECTOR_SRC}
42         ${DISSECTOR_SUPPORT_SRC}
43 )
44
45 set(CLEAN_FILES
46         ${PLUGIN_FILES}
47 )
48
49 if (WERROR)
50         set_source_files_properties(
51                 ${CLEAN_FILES}
52                 PROPERTIES
53                 COMPILE_FLAGS -Werror
54         )
55 endif()
56
57 include_directories(${CMAKE_CURRENT_SOURCE_DIR})
58
59 register_dissector_files(plugin.c
60         plugin
61         ${DISSECTOR_SRC}
62 )
63
64 # todo
65 # Do I need any of this or is this handled by type MODULE?
66 # asn1_la_LDFLAGS = -module -avoid-version
67
68 add_library(profinet ${LINK_MODE_MODULE}
69         ${PLUGIN_FILES}
70 )
71
72 target_link_libraries(profinet epan)
73
74 install(TARGETS profinet
75         LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION}
76         RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION}
77         ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION}
78 )
79