aboutsummaryrefslogtreecommitdiff
path: root/examples/meson.build
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2017-08-09 17:30:51 -0400
committerGitHub <noreply@github.com>2017-08-09 17:30:51 -0400
commit3ce1341e3c0276ef20df5c7b89cc9ce260d05b9e (patch)
tree76b53d12dde6ec82f989a1a7bd72146058189374 /examples/meson.build
parentdf378d32740495d33dc46e799a547adc9b9620e1 (diff)
parentbd2e9a7168dc530c03b7b45ecfdd5ce0aff0ddb8 (diff)
Merge pull request #43 from acrisci/feature/shell-surface-interface
shell surface interface
Diffstat (limited to 'examples/meson.build')
-rw-r--r--examples/meson.build24
1 files changed, 23 insertions, 1 deletions
diff --git a/examples/meson.build b/examples/meson.build
index a44a4946..646a4b88 100644
--- a/examples/meson.build
+++ b/examples/meson.build
@@ -8,10 +8,32 @@ executable('pointer', 'pointer.c', dependencies: dep_wlr, link_with: lib_shared)
executable('touch', 'touch.c', dependencies: dep_wlr, link_with: lib_shared)
executable('tablet', 'tablet.c', dependencies: dep_wlr, link_with: lib_shared)
+wayland_scanner = find_program('wayland-scanner')
+wl_protocol_dir = dep_wayland_proto.get_pkgconfig_variable('pkgdatadir')
+
+wayland_scanner_server = generator(wayland_scanner,
+ output: '@BASENAME@-protocol.h',
+ arguments: ['server-header', '@INPUT@', '@OUTPUT@'])
+
+wayland_scanner_code = generator(wayland_scanner,
+ output: '@BASENAME@-protocol.c',
+ arguments: ['code', '@INPUT@', '@OUTPUT@'])
+
compositor_src = [
'compositor/main.c',
'compositor/wl_compositor.c',
- 'compositor/wl_shell.c'
+ 'compositor/wl_shell.c',
+ 'compositor/xdg_shell.c',
]
+protocols = [
+ [ 'unstable', 'xdg-shell', 'xdg-shell-unstable-v6.xml' ]
+]
+
+foreach p : protocols
+ xml = join_paths([wl_protocol_dir] + p)
+ compositor_src += wayland_scanner_code.process(xml)
+ compositor_src += wayland_scanner_server.process(xml)
+endforeach
+
executable('compositor', compositor_src, dependencies: dep_wlr, link_with: lib_shared)