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 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82
|
fs = import('fs')
wl_protocol_dir = wayland_protos.get_variable(pkgconfig: 'pkgdatadir')
wayland_scanner = find_program('wayland-scanner')
wayland_protocols = [
[wl_protocol_dir, 'stable/tablet/tablet-v2.xml'],
[wl_protocol_dir, 'stable/xdg-shell/xdg-shell.xml'],
[wl_protocol_dir, 'staging/cursor-shape/cursor-shape-v1.xml'],
[wl_protocol_dir, 'staging/ext-foreign-toplevel-list/ext-foreign-toplevel-list-v1.xml'],
[wl_protocol_dir, 'staging/ext-image-capture-source/ext-image-capture-source-v1.xml'],
[wl_protocol_dir, 'staging/ext-image-copy-capture/ext-image-copy-capture-v1.xml'],
[wl_protocol_dir, 'unstable/pointer-constraints/pointer-constraints-unstable-v1.xml'],
[wl_protocol_dir, 'unstable/text-input/text-input-unstable-v3.xml'],
[wl_protocol_dir, 'unstable/xdg-decoration/xdg-decoration-unstable-v1.xml'],
['gtk-shell.xml'],
['phoc-device-state-unstable-v1.xml'],
['phoc-layer-shell-effects-unstable-v1.xml'],
['phosh-private.xml'],
['wlr-foreign-toplevel-management-unstable-v1.xml'],
['wlr-layer-shell-unstable-v1.xml'],
['wlr-output-power-management-unstable-v1.xml'],
['wlr-screencopy-unstable-v1.xml'],
['xx-cutouts-v1.xml'],
]
wayland_client_protocols = [[wl_protocol_dir, 'staging/ext-idle-notify/ext-idle-notify-v1.xml']]
protos_inc_dir = include_directories('.')
protos_sources = []
server_protos_headers = []
client_protos_headers = []
foreach p : wayland_protocols
xml = join_paths(p)
base = fs.name(xml)
proto = fs.stem(base)
protos_sources += custom_target(
'@0@ source'.format(proto),
input: xml,
output: '@0@-protocol.c'.format(proto),
command: [wayland_scanner, 'private-code', '@INPUT@', '@OUTPUT@'],
)
server_protos_headers += custom_target(
'@0@ server header'.format(proto),
input: xml,
output: '@0@-protocol.h'.format(proto),
command: [wayland_scanner, 'server-header', '@INPUT@', '@OUTPUT@'],
)
client_protos_headers += custom_target(
'@0@ client header'.format(proto),
input: xml,
output: '@0@-client-protocol.h'.format(proto),
command: [wayland_scanner, 'client-header', '@INPUT@', '@OUTPUT@'],
)
endforeach
foreach p : wayland_client_protocols
xml = join_paths(p)
base = fs.name(xml)
proto = fs.stem(base)
protos_sources += custom_target(
'@0@ source'.format(proto),
input: xml,
output: '@0@-protocol.c'.format(proto),
command: [wayland_scanner, 'private-code', '@INPUT@', '@OUTPUT@'],
)
client_protos_headers += custom_target(
'@0@ client header'.format(proto),
input: xml,
output: '@0@-client-protocol.h'.format(proto),
command: [wayland_scanner, 'client-header', '@INPUT@', '@OUTPUT@'],
)
endforeach
|