drsuapi_SupportedExtensionsExt
[wireshark-sm.git] / epan / wslua / CMakeLists.txt
blob9f35e1486ab3dde4799ebd2953ddb1d5283b11bf
1 # CMakeLists.txt
3 # Wireshark - Network traffic analyzer
4 # By Gerald Combs <gerald@wireshark.org>
5 # Copyright 1998 Gerald Combs
7 # SPDX-License-Identifier: GPL-2.0-or-later
10 add_subdirectory(lrexlib)
12 set(WSLUA_MODULES
13         ${CMAKE_CURRENT_SOURCE_DIR}/lua_bitop.c
14         ${CMAKE_CURRENT_SOURCE_DIR}/wslua_address.c
15         ${CMAKE_CURRENT_SOURCE_DIR}/wslua_byte_array.c
16         ${CMAKE_CURRENT_SOURCE_DIR}/wslua_capture_info.c
17         ${CMAKE_CURRENT_SOURCE_DIR}/wslua_column.c
18         ${CMAKE_CURRENT_SOURCE_DIR}/wslua_dir.c
19         ${CMAKE_CURRENT_SOURCE_DIR}/wslua_dissector.c
20         ${CMAKE_CURRENT_SOURCE_DIR}/wslua_dumper.c
21         ${CMAKE_CURRENT_SOURCE_DIR}/wslua_field.c
22         ${CMAKE_CURRENT_SOURCE_DIR}/wslua_file.c
23         ${CMAKE_CURRENT_SOURCE_DIR}/wslua_file_common.c
24         ${CMAKE_CURRENT_SOURCE_DIR}/wslua_file_handler.c
25         ${CMAKE_CURRENT_SOURCE_DIR}/wslua_frame_info.c
26         ${CMAKE_CURRENT_SOURCE_DIR}/wslua_gui.c
27         ${CMAKE_CURRENT_SOURCE_DIR}/wslua_int64.c
28         ${CMAKE_CURRENT_SOURCE_DIR}/wslua_internals.c
29         ${CMAKE_CURRENT_SOURCE_DIR}/wslua_listener.c
30         ${CMAKE_CURRENT_SOURCE_DIR}/wslua_nstime.c
31         ${CMAKE_CURRENT_SOURCE_DIR}/wslua_pinfo.c
32         ${CMAKE_CURRENT_SOURCE_DIR}/wslua_pref.c
33         ${CMAKE_CURRENT_SOURCE_DIR}/wslua_proto.c
34         ${CMAKE_CURRENT_SOURCE_DIR}/wslua_proto_expert.c
35         ${CMAKE_CURRENT_SOURCE_DIR}/wslua_proto_field.c
36         ${CMAKE_CURRENT_SOURCE_DIR}/wslua_struct.c
37         ${CMAKE_CURRENT_SOURCE_DIR}/wslua_tree.c
38         ${CMAKE_CURRENT_SOURCE_DIR}/wslua_tvb.c
39         ${CMAKE_CURRENT_SOURCE_DIR}/wslua_utility.c
40         ${CMAKE_CURRENT_SOURCE_DIR}/wslua_wtap.c
43 set(WSLUA_FILES
44         ${WSLUA_MODULES}
45         ${CMAKE_CURRENT_BINARY_DIR}/taps_wslua.c
46         ${CMAKE_CURRENT_BINARY_DIR}/register_wslua.c
47         ${CMAKE_CURRENT_SOURCE_DIR}/init_wslua.c
49 source_group(wslua FILES ${WSLUA_FILES})
51 set_source_files_properties(
52         ${WSLUA_FILES}
53         PROPERTIES
54         COMPILE_FLAGS "${WERROR_COMMON_FLAGS}"
57 # make-taps.py depends on the current working directory
58 # to find the dissector files (contents of taps file
59 # depend on this actually, so just changing the paths
60 # in these lists won't help).
62 # Used with untypical CWD
63 set(WSLUA_TAPS_USED
64         ${CMAKE_SOURCE_DIR}/epan/dissectors/packet-http.h
65         ${CMAKE_SOURCE_DIR}/epan/dissectors/packet-ip.h
66         ${CMAKE_SOURCE_DIR}/epan/dissectors/packet-udp.h
67         ${CMAKE_SOURCE_DIR}/epan/dissectors/packet-h225.h
68         ${CMAKE_SOURCE_DIR}/epan/dissectors/packet-ieee80211.h
71 add_custom_command(
72         OUTPUT
73                 ${CMAKE_BINARY_DIR}/epan/wslua/taps_wslua.c
74                 # XXX taps.txt doesn't appear to be used anywhere.
75                 ${CMAKE_BINARY_DIR}/epan/wslua/taps.txt
76         COMMAND
77                 ${Python3_EXECUTABLE}
78                 ${CMAKE_SOURCE_DIR}/epan/wslua/make-taps.py
79                 ${CMAKE_BINARY_DIR}/epan/wslua/taps_wslua.c
80                 ${CMAKE_BINARY_DIR}/epan/wslua/taps.txt
81         DEPENDS
82                 ${CMAKE_SOURCE_DIR}/epan/wslua/taps.ini
83                 ${CMAKE_SOURCE_DIR}/epan/wslua/make-taps.py
84                 # Only here to add dependencies for the taps "source" files
85                 ${WSLUA_TAPS_USED}
89 add_custom_command(
90         OUTPUT
91                 declare_wslua.h
92                 register_wslua.c
93         COMMAND
94                 ${Python3_EXECUTABLE}
95                 ${CMAKE_SOURCE_DIR}/epan/wslua/make-reg.py
96                 ${WSLUA_MODULES}
97         DEPENDS
98                 ${CMAKE_SOURCE_DIR}/epan/wslua/make-reg.py
99                 ${WSLUA_MODULES}
100                 # ${CMAKE_CURRENT_BINARY_DIR}/taps_wslua.c
103 add_custom_target(
104         register_wslua ALL
105         DEPENDS
106                 declare_wslua.h
107                 register_wslua.c
110 set_target_properties(register_wslua PROPERTIES FOLDER "Libs/epan/wslua")
112 add_library(wslua OBJECT
113         ${WSLUA_FILES}
116 if(FETCH_lua)
117         add_dependencies(wslua lua54)
118 endif()
120 target_include_directories(wslua
121         SYSTEM PRIVATE
122                 ${LUA_INCLUDE_DIRS}
123         PRIVATE
124                 ${CMAKE_CURRENT_BINARY_DIR}
125                 ${CMAKE_CURRENT_SOURCE_DIR}
128 set_target_properties(wslua PROPERTIES
129         FOLDER "Libs/epan/wslua"
130         COMPILE_DEFINITIONS "WS_BUILD_DLL"
133 CHECKAPI(
134         NAME
135           wslua
136         SWITCHES
137         SOURCES
138           ${WSLUA_FILES}
142 # Editor modelines  -  https://www.wireshark.org/tools/modelines.html
144 # Local variables:
145 # c-basic-offset: 8
146 # tab-width: 8
147 # indent-tabs-mode: t
148 # End:
150 # vi: set shiftwidth=8 tabstop=8 noexpandtab:
151 # :indentSize=8:tabSize=8:noTabs=false: