summaryrefslogtreecommitdiffstats
path: root/generated/wayland
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2021-11-07 13:28:16 -0600
committerDudemanguy <random342@airmail.cc>2021-11-14 19:13:10 +0000
commitff322864f2878a35b277111e509da03fe6f888bd (patch)
tree44a99850fb0adffdd51cb0406ca24ecd5c917b2d /generated/wayland
parentf610fe16c0b1cb74d73d02dc55792d4ddc262ad2 (diff)
downloadmpv-ff322864f2878a35b277111e509da03fe6f888bd.tar.bz2
mpv-ff322864f2878a35b277111e509da03fe6f888bd.tar.xz
build: add meson build support
Adds support for the meson build system as well as a bit of documentation. Compatibility with the existing waf build is maintained.
Diffstat (limited to 'generated/wayland')
-rw-r--r--generated/wayland/meson.build32
1 files changed, 32 insertions, 0 deletions
diff --git a/generated/wayland/meson.build b/generated/wayland/meson.build
new file mode 100644
index 0000000000..19ed4bc023
--- /dev/null
+++ b/generated/wayland/meson.build
@@ -0,0 +1,32 @@
+wl_protocol_dir = wayland['deps'][2].get_variable(pkgconfig: 'pkgdatadir')
+protocols = [[wl_protocol_dir, 'stable/xdg-shell/xdg-shell.xml'],
+ [wl_protocol_dir, 'stable/presentation-time/presentation-time.xml'],
+ [wl_protocol_dir, 'unstable/idle-inhibit/idle-inhibit-unstable-v1.xml'],
+ [wl_protocol_dir, 'unstable/xdg-decoration/xdg-decoration-unstable-v1.xml']]
+wl_protocols_source = []
+wl_protocols_headers = []
+
+foreach p: protocols
+ xml = join_paths(p)
+ wl_protocols_source += custom_target(xml.underscorify() + '_c',
+ input: xml,
+ output: '@BASENAME@.c',
+ command: [wayland['scanner'], 'private-code', '@INPUT@', '@OUTPUT@'],
+ )
+ wl_protocols_headers += custom_target(xml.underscorify() + '_h',
+ input: xml,
+ output: '@BASENAME@.h',
+ command: [wayland['scanner'], 'client-header', '@INPUT@', '@OUTPUT@'],
+ )
+endforeach
+
+lib_client_protocols = static_library('protocols',
+ wl_protocols_source + wl_protocols_headers,
+ dependencies: wayland['deps'][0])
+
+client_protocols = declare_dependency(link_with: lib_client_protocols,
+ sources: wl_protocols_headers)
+
+dependencies += [client_protocols, wayland['deps']]
+
+sources += ['video/out/wayland_common.c']