forked from external/yambar
The ‘river’ module depends on generated protocol sources. These are normally provided, indirectly, by the Wayland bar backend. But when building plugins as shared modules, the plugins no longer depend on the bar, and thus ‘river’ fails to build. Fix this by doing two things: * **Remove** the ‘river’ protocol from the ‘generic’ Wayland protocols * Explicitly add both the generic and the ‘river’ specific protocols to the ‘river’ module.
47 lines
1.5 KiB
Meson
47 lines
1.5 KiB
Meson
bar_backends = []
|
|
|
|
if backend_x11
|
|
bar_x11 = declare_dependency(sources: ['xcb.c', 'xcb.h'], dependencies: [xcb_stuff])
|
|
bar_backends += [bar_x11]
|
|
endif
|
|
|
|
if backend_wayland
|
|
wayland_protocols = dependency('wayland-protocols')
|
|
wayland_protocols_datadir = wayland_protocols.get_pkgconfig_variable('pkgdatadir')
|
|
|
|
wscanner = dependency('wayland-scanner', native: true)
|
|
wscanner_prog = find_program(
|
|
wscanner.get_pkgconfig_variable('wayland_scanner'), native: true)
|
|
|
|
wl_proto_headers = []
|
|
wl_proto_src = []
|
|
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']
|
|
|
|
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'] + wl_proto_src + wl_proto_headers,
|
|
dependencies: [wayland_client, wayland_cursor, tllist])
|
|
|
|
bar_backends += [bar_wayland]
|
|
endif
|
|
|
|
bar = declare_dependency(
|
|
sources: ['bar.c', 'bar.h', 'private.h', 'backend.h'],
|
|
dependencies: bar_backends + [threads])
|
|
|
|
install_headers('bar.h', subdir: 'yambar/bar')
|