[Build] Fix deprecated format() in meson.build

In Wayland builds
This commit is contained in:
lbonn 2024-02-26 23:39:05 +01:00
parent ccb8385d93
commit 1d9819fe50

View file

@ -285,7 +285,8 @@ theme_lexer = flex.process(theme_lexer_sources)
theme_parser = bison.process(theme_parser_sources) theme_parser = bison.process(theme_parser_sources)
if wayland_enabled if wayland_enabled
wayland_sys_protocols_dir = wayland_protocols.get_pkgconfig_variable('pkgdatadir') fs = import('fs')
wayland_sys_protocols_dir = wayland_protocols.get_variable(pkgconfig: 'pkgdatadir')
wayland_scanner = find_program('wayland-scanner') wayland_scanner = find_program('wayland-scanner')
protocols = files( protocols = files(
wayland_sys_protocols_dir + '/stable/xdg-shell/xdg-shell.xml', wayland_sys_protocols_dir + '/stable/xdg-shell/xdg-shell.xml',
@ -307,13 +308,13 @@ if wayland_enabled
proto_headers = [] proto_headers = []
foreach p : protocols foreach p : protocols
proto_srcs += custom_target( proto_srcs += custom_target(
'@0@'.format(p).underscorify() + '_protocol_c', fs.stem(p).underscorify() + '_protocol_c',
input: p, input: p,
output: '@BASENAME@-protocol.c', output: '@BASENAME@-protocol.c',
command: [wayland_scanner, 'public-code', '@INPUT@', '@OUTPUT@'], command: [wayland_scanner, 'public-code', '@INPUT@', '@OUTPUT@'],
) )
proto_headers += custom_target( proto_headers += custom_target(
'@0@'.format(p).underscorify() + '_protocol_h', fs.stem(p).underscorify() + '_protocol_h',
input: p, input: p,
output: '@BASENAME@-protocol.h', output: '@BASENAME@-protocol.h',
command: [wayland_scanner, 'client-header', '@INPUT@', '@OUTPUT@'], command: [wayland_scanner, 'client-header', '@INPUT@', '@OUTPUT@'],