From e25c42dc8721f5a171c636d772e1270b4b69e5fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Thu, 24 Sep 2020 17:28:48 +0200 Subject: [PATCH] module/river: meson: explicitly add wl_proto_src + wl_proto_headers to sources MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- bar/meson.build | 1 - modules/meson.build | 20 +++++++++++++++++++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/bar/meson.build b/bar/meson.build index 5df4b09..90f050b 100644 --- a/bar/meson.build +++ b/bar/meson.build @@ -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'] diff --git a/modules/meson.build b/modules/meson.build index 3efcc9e..e05362f 100644 --- a/modules/meson.build +++ b/modules/meson.build @@ -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