summaryrefslogtreecommitdiff
path: root/protocol/meson.build
blob: 0a27675c3de99cf75e2cfa84a1e0985350680442 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
protocols_dir = wayland_protocols.get_variable(pkgconfig: 'pkgdatadir')

wayland_scanner = dependency('wayland-scanner', native: true)
wayland_scanner_exe = find_program(
  wayland_scanner.get_variable(pkgconfig: 'wayland_scanner'),
  native: true,
)

protocols = {
  'input-method-unstable-v2': 'input-method-unstable-v2.xml',
}

foreach name, path : protocols
	code = custom_target(
		name.underscorify() + '_c',
		input: path,
		output: '@BASENAME@-protocol.c',
		command: [wayland_scanner_exe, 'private-code', '@INPUT@', '@OUTPUT@'],
	)
	wlhangul_files += code

	client_header = custom_target(
		name.underscorify() + '_client_h',
		input: path,
		output: '@BASENAME@-client-protocol.h',
		command: [wayland_scanner_exe, 'client-header', '@INPUT@', '@OUTPUT@'],
	)
	wlhangul_files += client_header
endforeach