2021-02-18 13:58:11 +00:00
|
|
|
wayland_scanner_dep = dependency('wayland-scanner', native: true)
|
|
|
|
wayland_scanner_path = wayland_scanner_dep.get_variable(pkgconfig: 'wayland_scanner')
|
|
|
|
wayland_scanner = find_program(wayland_scanner_path, native: true)
|
|
|
|
|
2021-07-29 08:09:10 +00:00
|
|
|
protocols = [
|
|
|
|
'gamescope-xwayland',
|
|
|
|
'gamescope-pipewire',
|
2021-09-24 09:08:18 +00:00
|
|
|
'gamescope-input-method',
|
2022-08-24 23:24:37 +00:00
|
|
|
'gamescope-tearing-control-unstable-v1',
|
2021-07-29 08:09:10 +00:00
|
|
|
]
|
2021-02-18 13:58:11 +00:00
|
|
|
|
2022-12-02 18:17:52 +00:00
|
|
|
protocols_client_src = []
|
|
|
|
protocols_server_src = []
|
|
|
|
|
2021-07-29 08:09:10 +00:00
|
|
|
foreach name : protocols
|
|
|
|
code = custom_target(
|
|
|
|
name + '-protocol.c',
|
|
|
|
input: name + '.xml',
|
|
|
|
output: '@BASENAME@-protocol.c',
|
|
|
|
command: [wayland_scanner, 'private-code', '@INPUT@', '@OUTPUT@'],
|
|
|
|
)
|
2021-02-18 13:58:11 +00:00
|
|
|
|
2021-07-29 08:09:10 +00:00
|
|
|
server_header = custom_target(
|
|
|
|
name + '-protocol.h',
|
|
|
|
input: name + '.xml',
|
|
|
|
output: '@BASENAME@-protocol.h',
|
|
|
|
command: [wayland_scanner, 'server-header', '@INPUT@', '@OUTPUT@'],
|
|
|
|
)
|
|
|
|
|
2022-12-02 18:17:52 +00:00
|
|
|
client_header = custom_target(
|
|
|
|
name + '-client-protocol.h',
|
|
|
|
input: name + '.xml',
|
|
|
|
output: '@BASENAME@-client-protocol.h',
|
|
|
|
command: [wayland_scanner, 'client-header', '@INPUT@', '@OUTPUT@'],
|
|
|
|
)
|
|
|
|
|
|
|
|
protocols_server_src += [code, server_header]
|
|
|
|
protocols_client_src += [code, client_header]
|
2021-07-29 08:09:10 +00:00
|
|
|
endforeach
|