module/river: meson: explicitly add wl_proto_src + wl_proto_headers to sources

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.
This commit is contained in:
Daniel Eklöf 2020-09-24 17:28:48 +02:00
parent 41d0a17ea5
commit e25c42dc87
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
2 changed files with 19 additions and 2 deletions

View file

@ -17,7 +17,6 @@ if backend_wayland
wl_proto_src = []
foreach prot : [
'../external/wlr-layer-shell-unstable-v1.xml',
'../external/river-status-unstable-v1.xml',
wayland_protocols_datadir + '/stable/xdg-shell/xdg-shell.xml',
wayland_protocols_datadir + '/unstable/xdg-output/xdg-output-unstable-v1.xml']

View file

@ -30,8 +30,26 @@ if backend_x11
endif
if backend_wayland
river_proto_headers = []
river_proto_src = []
foreach prot : ['../external/river-status-unstable-v1.xml']
river_proto_headers += custom_target(
prot.underscorify() + '-client-header',
output: '@BASENAME@.h',
input: prot,
command: [wscanner_prog, 'client-header', '@INPUT@', '@OUTPUT@'])
river_proto_src += custom_target(
prot.underscorify() + '-private-code',
output: '@BASENAME@.c',
input: prot,
command: [wscanner_prog, 'private-code', '@INPUT@', '@OUTPUT@'])
endforeach
deps += {
'river': [[], []],
'river': [[wl_proto_src + wl_proto_headers + river_proto_src + river_proto_headers], []],
}
endif