diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-03-27 13:35:34 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2018-03-28 14:25:19 -0400 |
commit | eccf0b25987b2b194031edf3415e9f09a7ad7119 (patch) | |
tree | 1392beed8f4745a36047d8194f3ac9eb20117f44 /protocols/meson.build | |
parent | Merge pull request #1641 from swaywm/transformed-events (diff) | |
download | sway-eccf0b25987b2b194031edf3415e9f09a7ad7119.tar.gz sway-eccf0b25987b2b194031edf3415e9f09a7ad7119.tar.zst sway-eccf0b25987b2b194031edf3415e9f09a7ad7119.zip |
Add client protocols and swaybg skeleton
Diffstat (limited to 'protocols/meson.build')
-rw-r--r-- | protocols/meson.build | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/protocols/meson.build b/protocols/meson.build new file mode 100644 index 00000000..73a6fda5 --- /dev/null +++ b/protocols/meson.build | |||
@@ -0,0 +1,49 @@ | |||
1 | wl_protocol_dir = wayland_protos.get_pkgconfig_variable('pkgdatadir') | ||
2 | |||
3 | wayland_scanner = find_program('wayland-scanner') | ||
4 | |||
5 | wayland_scanner_server = generator( | ||
6 | wayland_scanner, | ||
7 | output: '@BASENAME@-protocol.h', | ||
8 | arguments: ['server-header', '@INPUT@', '@OUTPUT@'], | ||
9 | ) | ||
10 | |||
11 | wayland_scanner_code = generator( | ||
12 | wayland_scanner, | ||
13 | output: '@BASENAME@-protocol.c', | ||
14 | arguments: ['code', '@INPUT@', '@OUTPUT@'], | ||
15 | ) | ||
16 | |||
17 | wayland_scanner_client = generator( | ||
18 | wayland_scanner, | ||
19 | output: '@BASENAME@-client-protocol.h', | ||
20 | arguments: ['client-header', '@INPUT@', '@OUTPUT@'], | ||
21 | ) | ||
22 | |||
23 | protocols = [] | ||
24 | |||
25 | client_protocols = [ | ||
26 | 'wlr-layer-shell-unstable-v1.xml', | ||
27 | ] | ||
28 | |||
29 | wl_protos_src = [] | ||
30 | wl_protos_headers = [] | ||
31 | |||
32 | foreach p : protocols | ||
33 | xml = join_paths(p) | ||
34 | wl_protos_src += wayland_scanner_code.process(xml) | ||
35 | wl_protos_headers += wayland_scanner_server.process(xml) | ||
36 | endforeach | ||
37 | |||
38 | foreach p : client_protocols | ||
39 | xml = join_paths(p) | ||
40 | wl_protos_headers += wayland_scanner_client.process(xml) | ||
41 | endforeach | ||
42 | |||
43 | lib_wl_protos = static_library('wl_protos', wl_protos_src + wl_protos_headers, | ||
44 | dependencies: [wayland_client]) # for the include directory | ||
45 | |||
46 | sway_protos = declare_dependency( | ||
47 | link_with: lib_wl_protos, | ||
48 | sources: wl_protos_headers, | ||
49 | ) | ||