Wayland compositor (wlroots)
git clone https://git.lucas.co/cce-compositor.git
scenefx/protocol/meson.build (1.4K)
1 wayland_protos = dependency('wayland-protocols',
2 version: '>=1.41',
3 fallback: 'wayland-protocols',
4 default_options: ['tests=false'],
5 )
6 wl_protocol_dir = wayland_protos.get_variable('pkgdatadir')
7
8 wayland_scanner_dep = dependency('wayland-scanner',
9 kwargs: wayland_kwargs,
10 native: true,
11 )
12 wayland_scanner = find_program(
13 wayland_scanner_dep.get_variable('wayland_scanner'),
14 native: true,
15 )
16
17 protocols = {
18 'xdg-shell': wl_protocol_dir / 'stable/xdg-shell/xdg-shell.xml',
19 }
20
21 protocols_code = {}
22 protocols_server_header = {}
23 protocols_client_header = {}
24 foreach name, path : protocols
25 code = custom_target(
26 name.underscorify() + '_c',
27 input: path,
28 output: '@[email protected]',
29 command: [wayland_scanner, 'private-code', '@INPUT@', '@OUTPUT@'],
30 )
31 scenefx_files += code
32
33 server_header = custom_target(
34 name.underscorify() + '_server_h',
35 input: path,
36 output: '@[email protected]',
37 command: [wayland_scanner, 'server-header', '@INPUT@', '@OUTPUT@'],
38 )
39 scenefx_files += server_header
40
41 client_header = custom_target(
42 name.underscorify() + '_client_h',
43 input: path,
44 output: '@[email protected]',
45 command: [wayland_scanner, 'client-header', '@INPUT@', '@OUTPUT@'],
46 build_by_default: false,
47 )
48
49 protocols_code += { name: code }
50 protocols_server_header += { name: server_header }
51 protocols_client_header += { name: client_header }
52 endforeach