aboutsummaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorArslaan Pathan <[email protected]>2026-05-15 08:09:14 +1200
committerArslaan Pathan <[email protected]>2026-05-15 08:09:14 +1200
commitbe3da49ea23bbadf04c8a9b9190598a257a33bf2 (patch)
treecd6395ee905a28640f47e066f0ebbd1acb325f2a /meson.build
downloadsimple-wayland-client-be3da49ea23bbadf04c8a9b9190598a257a33bf2.tar.xz
simple-wayland-client-be3da49ea23bbadf04c8a9b9190598a257a33bf2.zip
Initial commit
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build26
1 files changed, 26 insertions, 0 deletions
diff --git a/meson.build b/meson.build
new file mode 100644
index 0000000..b704ec7
--- /dev/null
+++ b/meson.build
@@ -0,0 +1,26 @@
+project('wayland_test', 'c')
+
+wayland_client = dependency('wayland-client')
+wayland_protocols = dependency('wayland-protocols')
+
+xdg_shell_xml = wayland_protocols.get_variable(pkgconfig: 'pkgdatadir') + '/stable/xdg-shell/xdg-shell.xml'
+
+xdg_shell_header = custom_target(
+ 'xdg-shell-client-protocol.h',
+ input: xdg_shell_xml,
+ output: 'xdg-shell-client-protocol.h',
+ command: ['wayland-scanner', 'client-header', '@INPUT@', '@OUTPUT@']
+)
+
+xdg_shell_source = custom_target(
+ 'xdg-shell-protocol.c',
+ input: xdg_shell_xml,
+ output: 'xdg-shell-protocol.c',
+ command: ['wayland-scanner', 'private-code', '@INPUT@', '@OUTPUT@']
+)
+
+executable('simple-wayland-client',
+ ['main.c', xdg_shell_source, xdg_shell_header],
+ dependencies: [wayland_client],
+ include_directories: include_directories('.')
+)