| 1 |
generated_private_protocols = [ |
| 2 |
'wayland-eglstream', |
| 3 |
] |
| 4 |
|
| 5 |
generated_public_protocols = [ |
| 6 |
'wayland-eglstream-controller', |
| 7 |
] |
| 8 |
|
| 9 |
foreach proto : generated_private_protocols + generated_public_protocols |
| 10 |
foreach output_type: ['client-header', 'server-header', 'private-code'] |
| 11 |
if output_type == 'client-header' |
| 12 |
output_file = '@[email protected]'.format(proto) |
| 13 |
elif output_type == 'server-header' |
| 14 |
output_file = '@[email protected]'.format(proto) |
| 15 |
else |
| 16 |
output_file = '@[email protected]'.format(proto) |
| 17 |
if wl_scanner.version().version_compare('< 1.14.91') |
| 18 |
output_type = 'code' |
| 19 |
elif generated_public_protocols.contains(proto) |
| 20 |
output_type = 'public-code' |
| 21 |
endif |
| 22 |
endif |
| 23 |
|
| 24 |
var_name = output_file.underscorify() |
| 25 |
target = custom_target( |
| 26 |
'@0@'.format(output_file), |
| 27 |
command: [prog_scanner, output_type, '@INPUT@', '@OUTPUT@'], |
| 28 |
input: '@[email protected]'.format(proto), |
| 29 |
output: output_file, |
| 30 |
) |
| 31 |
|
| 32 |
set_variable(var_name, target) |
| 33 |
endforeach |
| 34 |
endforeach |
| 35 |
|
| 36 |
install_data( |
| 37 |
'wayland-eglstream.xml', |
| 38 |
'wayland-eglstream-controller.xml', |
| 39 |
install_dir : join_paths(get_option('datadir'), meson.project_name()) |
| 40 |
) |