diff options
author | 2018-04-12 20:19:54 -0400 | |
---|---|---|
committer | 2018-04-12 20:19:54 -0400 | |
commit | cd1b32453a9296c18b28bff71607aeb22987b5cd (patch) | |
tree | c653c6d525b471914c01a9d7ae543f521b6138ed /protocols/meson.build | |
parent | Merge pull request #1634 from aleksander/master (diff) | |
parent | Fix separator height calculation (diff) | |
download | sway-cd1b32453a9296c18b28bff71607aeb22987b5cd.tar.gz sway-cd1b32453a9296c18b28bff71607aeb22987b5cd.tar.zst sway-cd1b32453a9296c18b28bff71607aeb22987b5cd.zip |
Merge branch 'wlroots'
Diffstat (limited to 'protocols/meson.build')
-rw-r--r-- | protocols/meson.build | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/protocols/meson.build b/protocols/meson.build new file mode 100644 index 00000000..7f83b16b --- /dev/null +++ b/protocols/meson.build | |||
@@ -0,0 +1,73 @@ | |||
1 | wl_protocol_dir = wayland_protos.get_pkgconfig_variable('pkgdatadir') | ||
2 | |||
3 | wayland_scanner = find_program('wayland-scanner') | ||
4 | |||
5 | wayland_scanner_code = generator( | ||
6 | wayland_scanner, | ||
7 | output: '@BASENAME@-protocol.c', | ||
8 | arguments: ['code', '@INPUT@', '@OUTPUT@'], | ||
9 | ) | ||
10 | |||
11 | wayland_scanner_client = generator( | ||
12 | wayland_scanner, | ||
13 | output: '@BASENAME@-client-protocol.h', | ||
14 | arguments: ['client-header', '@INPUT@', '@OUTPUT@'], | ||
15 | ) | ||
16 | |||
17 | wayland_scanner_server = generator( | ||
18 | wayland_scanner, | ||
19 | output: '@BASENAME@-protocol.h', | ||
20 | arguments: ['server-header', '@INPUT@', '@OUTPUT@'], | ||
21 | ) | ||
22 | |||
23 | client_protocols = [ | ||
24 | [wl_protocol_dir, 'stable/xdg-shell/xdg-shell.xml'], | ||
25 | ['wlr-layer-shell-unstable-v1.xml'], | ||
26 | ['wlr-input-inhibitor-unstable-v1.xml'] | ||
27 | ] | ||
28 | |||
29 | server_protocols = [ | ||
30 | [wl_protocol_dir, 'unstable/xdg-shell/xdg-shell-unstable-v6.xml'], | ||
31 | ['wlr-layer-shell-unstable-v1.xml'], | ||
32 | ['wlr-input-inhibitor-unstable-v1.xml'] | ||
33 | ] | ||
34 | |||
35 | client_protos_src = [] | ||
36 | client_protos_headers = [] | ||
37 | |||
38 | server_protos_src = [] | ||
39 | server_protos_headers = [] | ||
40 | |||
41 | foreach p : client_protocols | ||
42 | xml = join_paths(p) | ||
43 | client_protos_src += wayland_scanner_code.process(xml) | ||
44 | client_protos_headers += wayland_scanner_client.process(xml) | ||
45 | endforeach | ||
46 | |||
47 | foreach p : server_protocols | ||
48 | xml = join_paths(p) | ||
49 | server_protos_src += wayland_scanner_code.process(xml) | ||
50 | server_protos_headers += wayland_scanner_server.process(xml) | ||
51 | endforeach | ||
52 | |||
53 | lib_client_protos = static_library( | ||
54 | 'client_protos', | ||
55 | client_protos_src + client_protos_headers, | ||
56 | dependencies: [wayland_client] | ||
57 | ) # for the include directory | ||
58 | |||
59 | client_protos = declare_dependency( | ||
60 | link_with: lib_client_protos, | ||
61 | sources: client_protos_headers, | ||
62 | ) | ||
63 | |||
64 | lib_server_protos = static_library( | ||
65 | 'server_protos', | ||
66 | server_protos_src + server_protos_headers, | ||
67 | dependencies: [wayland_client] | ||
68 | ) # for the include directory | ||
69 | |||
70 | server_protos = declare_dependency( | ||
71 | link_with: lib_server_protos, | ||
72 | sources: server_protos_headers, | ||
73 | ) | ||