add WERR_INVALID_STATE
[wireshark-wip.git] / plugins / profinet / CMakeLists.txt
blob5fd80da5e7f865b6d93821ebc46aa85718405988
1 # CMakeLists.txt
3 # $Id$
5 # Wireshark - Network traffic analyzer
6 # By Gerald Combs <gerald@wireshark.org>
7 # Copyright 1998 Gerald Combs
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.
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.
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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
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
35 set(DISSECTOR_SUPPORT_SRC
36         packet-pn.c
39 set(PLUGIN_FILES
40         plugin.c
41         ${DISSECTOR_SRC}
42         ${DISSECTOR_SUPPORT_SRC}
45 set(CLEAN_FILES
46         ${PLUGIN_FILES}
49 if (WERROR)
50         set_source_files_properties(
51                 ${CLEAN_FILES}
52                 PROPERTIES
53                 COMPILE_FLAGS -Werror
54         )
55 endif()
57 include_directories(${CMAKE_CURRENT_SOURCE_DIR})
59 register_dissector_files(plugin.c
60         plugin
61         ${DISSECTOR_SRC}
64 add_library(profinet ${LINK_MODE_MODULE}
65         ${PLUGIN_FILES}
67 set_target_properties(profinet PROPERTIES PREFIX "")
68 set_target_properties(profinet PROPERTIES LINK_FLAGS "${WS_LINK_FLAGS}")
69 set_target_properties(profinet PROPERTIES FOLDER "Plugins")
71 target_link_libraries(profinet epan)
73 install(TARGETS profinet
74         LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION} NAMELINK_SKIP
75         RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION}
76         ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION}