HACK: pinfo->private_data points to smb_info again
[wireshark-wip.git] / epan / wslua / CMakeLists.txt
bloba2446871037cbcf42066d566a1ac6119f95ecddf
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 # This file is to be included/run from epan/CMakeLists.txt
26 set(WSLUA_MODULES
27         ${CMAKE_CURRENT_SOURCE_DIR}/wslua/lua_bitop.c
28         ${CMAKE_CURRENT_SOURCE_DIR}/wslua/wslua_tvb.c
29         ${CMAKE_CURRENT_SOURCE_DIR}/wslua/wslua_proto.c
30         ${CMAKE_CURRENT_SOURCE_DIR}/wslua/wslua_tree.c
31         ${CMAKE_CURRENT_SOURCE_DIR}/wslua/wslua_pinfo.c
32         ${CMAKE_CURRENT_SOURCE_DIR}/wslua/wslua_listener.c
33         ${CMAKE_CURRENT_SOURCE_DIR}/wslua/wslua_gui.c
34         ${CMAKE_CURRENT_SOURCE_DIR}/wslua/wslua_util.c
35         ${CMAKE_CURRENT_SOURCE_DIR}/wslua/wslua_field.c
36         ${CMAKE_CURRENT_SOURCE_DIR}/wslua/wslua_dumper.c
39 set(WSLUA_FILES
40         ${WSLUA_MODULES}
41         taps_wslua.c
42         register_wslua.c
43         wslua/init_wslua.c
46 # Used with untypical CWD
47 set(WSLUA_TAPS_USED
48         ${CMAKE_SOURCE_DIR}/epan/dissectors/packet-http.h
49         ${CMAKE_SOURCE_DIR}/epan/dissectors/packet-ip.h
50         ${CMAKE_SOURCE_DIR}/epan/dissectors/packet-udp.h
51         ${CMAKE_SOURCE_DIR}/epan/dissectors/packet-h225.h
52         ${CMAKE_SOURCE_DIR}/epan/dissectors/packet-ieee80211.h
55 # make-taps.pl depends on the current working directory
56 # to find the dissector files (contents of taps file
57 # depend on this actually, so just changing the paths
58 # in these lists won't help).
59 ADD_CUSTOM_COMMAND(
60     OUTPUT
61       ${CMAKE_CURRENT_BINARY_DIR}/taps_wslua.c
62       ${CMAKE_CURRENT_BINARY_DIR}/taps.txt
63     COMMAND ${PERL_EXECUTABLE}
64       ${CMAKE_CURRENT_SOURCE_DIR}/wslua/make-taps.pl
65       ${CMAKE_CURRENT_SOURCE_DIR}/wslua/taps
66       ${CMAKE_CURRENT_BINARY_DIR}/taps_wslua.c
67       ${CMAKE_CURRENT_BINARY_DIR}/taps.txt
68     WORKING_DIRECTORY
69       ${CMAKE_CURRENT_SOURCE_DIR}/wslua
70     DEPENDS
71       ${CMAKE_CURRENT_SOURCE_DIR}/wslua/taps
72       ${CMAKE_CURRENT_SOURCE_DIR}/wslua/make-taps.pl
73       # Only here to add dependencies for the taps "source"files
74       ${WSLUA_TAPS_USED}
77 ADD_CUSTOM_COMMAND(
78     OUTPUT
79       declare_wslua.h
80       register_wslua.c
81     COMMAND ${PERL_EXECUTABLE}
82       ${CMAKE_CURRENT_SOURCE_DIR}/wslua/make-reg.pl
83       ${WSLUA_MODULES}
84     DEPENDS
85       ${CMAKE_CURRENT_SOURCE_DIR}/wslua/make-reg.pl
86       ${WSLUA_MODULES}
87       # ${CMAKE_CURRENT_BINARY_DIR}/taps_wslua.c
90 ADD_CUSTOM_COMMAND(
91     OUTPUT init.lua
92     COMMAND ${PERL_EXECUTABLE}
93       ${CMAKE_CURRENT_SOURCE_DIR}/wslua/make-init-lua.pl
94       ${CMAKE_SOURCE_DIR}
95       ${CMAKE_CURRENT_SOURCE_DIR}/wslua/template-init.lua
96       > init.lua
97     DEPENDS
98       ${CMAKE_CURRENT_SOURCE_DIR}/wslua/make-init-lua.pl
99       ${CMAKE_CURRENT_SOURCE_DIR}/wslua/template-init.lua
100       ${CMAKE_SOURCE_DIR}/epan/ftypes/ftypes.h
101       ${CMAKE_SOURCE_DIR}/wiretap/wtap.h
102       ${CMAKE_SOURCE_DIR}/epan/epan.h
103       ${CMAKE_SOURCE_DIR}/stat_menu.h
106 add_custom_target(
107      wsluaauxiliary ALL
108      DEPENDS
109         init.lua
111 set_target_properties(wsluaauxiliary PROPERTIES FOLDER "Auxiliary")
113 install(
114     FILES
115         wslua/console.lua
116         wslua/dtd_gen.lua
117         ${CMAKE_CURRENT_BINARY_DIR}/init.lua
118     DESTINATION
119         ${CMAKE_INSTALL_DATADIR}/${CPACK_PACKAGE_NAME}