aboutsummaryrefslogtreecommitdiffhomepage
path: root/protocols
diff options
context:
space:
mode:
authorMihai Fufezan <[email protected]>2024-05-12 20:26:42 +0300
committerVaxry <[email protected]>2024-05-14 23:13:35 +0100
commit3eeaea5be9324121678774761c0226fe98bf7e5b (patch)
treecc1ec993e6fee5eff156bf665309be5ea4d1c5a8 /protocols
parenteed1361f390590d406450c0747e4e2ce40a548fb (diff)
downloadHyprland-3eeaea5be9324121678774761c0226fe98bf7e5b.tar.gz
Hyprland-3eeaea5be9324121678774761c0226fe98bf7e5b.zip
Meson: add wayland.xml proto
Diffstat (limited to 'protocols')
-rw-r--r--protocols/meson.build22
1 files changed, 18 insertions, 4 deletions
diff --git a/protocols/meson.build b/protocols/meson.build
index adedbf8e..d583c466 100644
--- a/protocols/meson.build
+++ b/protocols/meson.build
@@ -24,7 +24,6 @@ hyprwayland_scanner = find_program(
)
protocols = [
- [wl_protocol_dir, 'stable/xdg-shell/xdg-shell.xml'],
[wl_protocol_dir, 'unstable/linux-dmabuf/linux-dmabuf-unstable-v1.xml'],
[wl_protocol_dir, 'unstable/text-input/text-input-unstable-v1.xml'],
['wlr-screencopy-unstable-v1.xml'],
@@ -99,12 +98,27 @@ foreach p : new_protocols
)
endforeach
-wayland_server = dependency('wayland-server', version: '>=1.20.0')
+wayland_server_dep = dependency('wayland-server', version: '>=1.20.0')
+wayland_server_dir = wayland_server_dep.get_variable('pkgdatadir')
+
+wl_server_protos = [
+ wayland_server_dir / 'wayland.xml'
+]
+wl_server_protos_gen = []
+foreach p : wl_server_protos
+ wl_server_protos_gen += custom_target(
+ p.underscorify(),
+ input: p,
+ install: false,
+ command: [hyprwayland_scanner, '--wayland-enums', '@INPUT@', '@OUTDIR@'],
+ )
+endforeach
lib_server_protos = static_library(
'server_protos',
- wl_protos_src + wl_protos_headers + new_wl_protos,
- dependencies: wayland_server.partial_dependency(compile_args: true),
+ wl_protos_src + wl_protos_headers + new_wl_protos + wl_server_protos_gen,
+ dependencies: wayland_server_dep.partial_dependency(compile_args: true),
)
server_protos = declare_dependency(