summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2024-04-17 15:25:34 +0200
committerSimon Ser <contact@emersion.fr>2024-04-17 15:25:34 +0200
commitd1fe52933e7cd1cd0016526eca512dd8b99252a5 (patch)
treec7ec0cf35570cee330fa8e57f58e574139c94de1
parent5057c716eb5960f6971be620ce03a808d0f191ac (diff)
xwayland: use array for protocol XML files
Saves us the repetition. Signed-off-by: Simon Ser <contact@emersion.fr> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1491>
-rw-r--r--hw/xwayland/meson.build53
1 files changed, 23 insertions, 30 deletions
diff --git a/hw/xwayland/meson.build b/hw/xwayland/meson.build
index 0097ca8b2..9b1e5b6ce 100644
--- a/hw/xwayland/meson.build
+++ b/hw/xwayland/meson.build
@@ -52,6 +52,24 @@ tearing_xml = join_paths(protodir, 'staging', 'tearing-control', 'tearing-contro
fractional_scale_xml = join_paths(protodir, 'staging', 'fractional-scale', 'fractional-scale-v1.xml')
syncobj_xml = join_paths(protodir, 'staging', 'linux-drm-syncobj', 'linux-drm-syncobj-v1.xml')
+proto_xml = [
+ relative_xml,
+ pointer_xml,
+ gestures_xml,
+ tablet_xml,
+ kbgrab_xml,
+ xdg_output_xml,
+ dmabuf_xml,
+ viewporter_xml,
+ xdg_shell_xml,
+ drm_lease_xml,
+ shortcuts_inhibit_xml,
+ xwayland_shell_xml,
+ tearing_xml,
+ fractional_scale_xml,
+ syncobj_xml,
+]
+
client_header = generator(scanner,
output : '@BASENAME@-client-protocol.h',
arguments : ['client-header', '@INPUT@', '@OUTPUT@']
@@ -67,36 +85,11 @@ code = generator(scanner,
output : '@BASENAME@-protocol.c',
arguments : [scanner_argument, '@INPUT@', '@OUTPUT@']
)
-srcs += client_header.process(relative_xml)
-srcs += client_header.process(pointer_xml)
-srcs += client_header.process(gestures_xml)
-srcs += client_header.process(tablet_xml)
-srcs += client_header.process(kbgrab_xml)
-srcs += client_header.process(xdg_output_xml)
-srcs += client_header.process(dmabuf_xml)
-srcs += client_header.process(viewporter_xml)
-srcs += client_header.process(xdg_shell_xml)
-srcs += client_header.process(drm_lease_xml)
-srcs += client_header.process(shortcuts_inhibit_xml)
-srcs += client_header.process(xwayland_shell_xml)
-srcs += client_header.process(tearing_xml)
-srcs += client_header.process(fractional_scale_xml)
-srcs += client_header.process(syncobj_xml)
-srcs += code.process(relative_xml)
-srcs += code.process(pointer_xml)
-srcs += code.process(gestures_xml)
-srcs += code.process(tablet_xml)
-srcs += code.process(kbgrab_xml)
-srcs += code.process(xdg_output_xml)
-srcs += code.process(dmabuf_xml)
-srcs += code.process(viewporter_xml)
-srcs += code.process(xdg_shell_xml)
-srcs += code.process(drm_lease_xml)
-srcs += code.process(shortcuts_inhibit_xml)
-srcs += code.process(xwayland_shell_xml)
-srcs += code.process(tearing_xml)
-srcs += code.process(fractional_scale_xml)
-srcs += code.process(syncobj_xml)
+
+foreach xml : proto_xml
+ srcs += client_header.process(xml)
+ srcs += code.process(xml)
+endforeach
if build_ei
xwayland_dep += libei_dep