1 wayland_scanner_bin = find_program('wayland-scanner')
4 _wayland_protocols = dependency('wayland-protocols')
5 wayland_client = dependency('wayland-client')
10 'session-recovery.xml',
15 wl_unstable_protocol_sys = [
16 join_paths('xdg-shell', 'xdg-shell-unstable-v6.xml'),
17 join_paths('linux-dmabuf', 'linux-dmabuf-unstable-v1.xml'),
18 join_paths('text-input', 'text-input-unstable-v1.xml'),
21 wl_stable_protocol_sys = [
22 join_paths('xdg-shell', 'xdg-shell.xml'),
25 foreach sys_protocol : wl_unstable_protocol_sys
26 wl_protocol_local += [
27 join_paths(_wayland_protocols.get_pkgconfig_variable('pkgdatadir'), 'unstable',
31 foreach sys_protocol : wl_stable_protocol_sys
32 wl_protocol_local += [
33 join_paths(_wayland_protocols.get_pkgconfig_variable('pkgdatadir'), 'stable',
40 foreach item : wl_protocol_local
41 gen_obj_c += custom_target('wl_code_'+item.underscorify(),
43 output : ['@BASENAME@-protocol.c'],
44 command: [wayland_scanner_bin, ['code','@INPUT@','@OUTPUT@']]
46 gen_obj_header += custom_target('wl_client_header_'+item.underscorify(),
48 output : ['@BASENAME@-client-protocol.h'],
49 command: [wayland_scanner_bin, ['client-header','@INPUT@','@OUTPUT@']]
51 gen_obj_header += custom_target('wl_server_header_'+item.underscorify(),
53 output : ['@BASENAME@-server-protocol.h'],
54 command: [wayland_scanner_bin, ['server-header','@INPUT@','@OUTPUT@']]
59 wayland_protocol_lib = static_library('wayland_protocol',
60 gen_obj_c + gen_obj_header,
63 wayland_protocol = declare_dependency(
64 include_directories: include_directories('.'),
65 link_with: wayland_protocol_lib,
66 sources: gen_obj_header,
67 dependencies : [wayland_client]