diff --git a/bar/meson.build b/bar/meson.build index 27f6162..781c8e8 100644 --- a/bar/meson.build +++ b/bar/meson.build @@ -14,28 +14,29 @@ if backend_wayland wscanner_prog = find_program( wscanner.get_pkgconfig_variable('wayland_scanner'), native: true) - wayland_protocol_header = generator( - wscanner_prog, - output: '@BASENAME@.h', - arguments: ['client-header', '@INPUT@', '@OUTPUT@']) - wayland_protocol_source = generator( - wscanner_prog, - output: '@BASENAME@.c', - arguments: ['private-code', '@INPUT@', '@OUTPUT@']) - + wl_proto_headers = [] + wl_proto_src = [] generated_wayland_protocols = [] foreach prot : [ '../external/wlr-layer-shell-unstable-v1.xml', wayland_protocols_datadir + '/stable/xdg-shell/xdg-shell.xml', wayland_protocols_datadir + '/unstable/xdg-output/xdg-output-unstable-v1.xml'] - generated_wayland_protocols += [ - wayland_protocol_header.process(prot), - wayland_protocol_source.process(prot)] + wl_proto_headers += custom_target( + prot.underscorify() + '-client-header', + output : '@BASENAME@.h', + input : prot, + command : [wscanner_prog, 'client-header', '@INPUT@', '@OUTPUT@']) + + wl_proto_src += custom_target( + prot.underscorify() + '-private-code', + output : '@BASENAME@.c', + input : prot, + command : [wscanner_prog, 'private-code', '@INPUT@', '@OUTPUT@']) endforeach bar_wayland = declare_dependency( - sources: ['wayland.c', 'wayland.h'] + generated_wayland_protocols, + sources: ['wayland.c', 'wayland.h'] + wl_proto_src + wl_proto_headers, dependencies: [wayland_client, wayland_cursor, cairo, cairo_ft]) bar_backends += [bar_wayland]