forked from external/yambar
meson: make ‘river’ plugin compile time optional
This commit is contained in:
parent
1a81255579
commit
56b0047004
4 changed files with 16 additions and 8 deletions
|
@ -147,6 +147,7 @@ yambar = executable(
|
||||||
plugin_pipewire_enabled ? '-DPLUGIN_ENABLED_PIPEWIRE' : [],
|
plugin_pipewire_enabled ? '-DPLUGIN_ENABLED_PIPEWIRE' : [],
|
||||||
plugin_pulse_enabled ? '-DPLUGIN_ENABLED_PULSE' : [],
|
plugin_pulse_enabled ? '-DPLUGIN_ENABLED_PULSE' : [],
|
||||||
plugin_removables_enabled ? '-DPLUGIN_ENABLED_REMOVABLES' : [],
|
plugin_removables_enabled ? '-DPLUGIN_ENABLED_REMOVABLES' : [],
|
||||||
|
plugin_river_enabled ? '-DPLUGIN_ENABLED_RIVER' : [],
|
||||||
plugin_script_enabled ? '-DPLUGIN_ENABLED_SCRIPT' : [],
|
plugin_script_enabled ? '-DPLUGIN_ENABLED_SCRIPT' : [],
|
||||||
plugin_sway_xkb_enabled ? '-DPLUGIN_ENABLED_SWAY_XKB' : [],
|
plugin_sway_xkb_enabled ? '-DPLUGIN_ENABLED_SWAY_XKB' : [],
|
||||||
plugin_xkb_enabled ? '-DPLUGIN_ENABLED_XKB' : [],
|
plugin_xkb_enabled ? '-DPLUGIN_ENABLED_XKB' : [],
|
||||||
|
@ -204,6 +205,7 @@ summary(
|
||||||
'Pipewire': plugin_pipewire_enabled,
|
'Pipewire': plugin_pipewire_enabled,
|
||||||
'PulseAudio': plugin_pulse_enabled,
|
'PulseAudio': plugin_pulse_enabled,
|
||||||
'Removables monitoring': plugin_removables_enabled,
|
'Removables monitoring': plugin_removables_enabled,
|
||||||
|
'River': plugin_river_enabled,
|
||||||
'Script': plugin_script_enabled,
|
'Script': plugin_script_enabled,
|
||||||
'Sway XKB keyboard': plugin_sway_xkb_enabled,
|
'Sway XKB keyboard': plugin_sway_xkb_enabled,
|
||||||
'XKB keyboard (for X11)': plugin_xkb_enabled,
|
'XKB keyboard (for X11)': plugin_xkb_enabled,
|
||||||
|
|
|
@ -36,6 +36,8 @@ option('plugin-pulse', type: 'feature', value: 'auto',
|
||||||
description: 'PulseAudio support')
|
description: 'PulseAudio support')
|
||||||
option('plugin-removables', type: 'feature', value: 'auto',
|
option('plugin-removables', type: 'feature', value: 'auto',
|
||||||
description: 'Removables (USB sticks, CD-ROM etc) monitoring support')
|
description: 'Removables (USB sticks, CD-ROM etc) monitoring support')
|
||||||
|
option('plugin-river', type: 'feature', value: 'auto',
|
||||||
|
description: 'River support')
|
||||||
option('plugin-script', type: 'feature', value: 'auto',
|
option('plugin-script', type: 'feature', value: 'auto',
|
||||||
description: 'Script support')
|
description: 'Script support')
|
||||||
option('plugin-sway-xkb', type: 'feature', value: 'auto',
|
option('plugin-sway-xkb', type: 'feature', value: 'auto',
|
||||||
|
|
|
@ -37,6 +37,8 @@ plugin_pulse_enabled = pulse.found()
|
||||||
udev_removables = dependency('udev', required: get_option('plugin-removables'))
|
udev_removables = dependency('udev', required: get_option('plugin-removables'))
|
||||||
plugin_removables_enabled = udev_removables.found()
|
plugin_removables_enabled = udev_removables.found()
|
||||||
|
|
||||||
|
plugin_river_enabled = backend_wayland and get_option('plugin-river').allowed()
|
||||||
|
|
||||||
plugin_script_enabled = get_option('plugin-script').allowed()
|
plugin_script_enabled = get_option('plugin-script').allowed()
|
||||||
|
|
||||||
json_sway_xkb = dependency('json-c', required: get_option('plugin-sway-xkb'))
|
json_sway_xkb = dependency('json-c', required: get_option('plugin-sway-xkb'))
|
||||||
|
@ -126,7 +128,7 @@ if plugin_xwindow_enabled
|
||||||
mod_data += {'xwindow': [[], [xcb_stuff]]}
|
mod_data += {'xwindow': [[], [xcb_stuff]]}
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if backend_wayland
|
if plugin_river_enabled
|
||||||
river_proto_headers = []
|
river_proto_headers = []
|
||||||
river_proto_src = []
|
river_proto_src = []
|
||||||
|
|
||||||
|
@ -145,10 +147,10 @@ if backend_wayland
|
||||||
command: [wscanner_prog, 'private-code', '@INPUT@', '@OUTPUT@'])
|
command: [wscanner_prog, 'private-code', '@INPUT@', '@OUTPUT@'])
|
||||||
endforeach
|
endforeach
|
||||||
|
|
||||||
mod_data += {
|
mod_data += {'river': [[wl_proto_src + wl_proto_headers + river_proto_src + river_proto_headers], [dynlist, wayland_client]]}
|
||||||
'river': [[wl_proto_src + wl_proto_headers + river_proto_src + river_proto_headers], [dynlist, wayland_client]],
|
endif
|
||||||
}
|
|
||||||
|
|
||||||
|
if backend_wayland
|
||||||
ftop_proto_headers = []
|
ftop_proto_headers = []
|
||||||
ftop_proto_src = []
|
ftop_proto_src = []
|
||||||
|
|
||||||
|
|
10
plugin.c
10
plugin.c
|
@ -78,6 +78,9 @@ EXTERN_MODULE(pulse);
|
||||||
#if defined(PLUGIN_ENABLED_REMOVABLES)
|
#if defined(PLUGIN_ENABLED_REMOVABLES)
|
||||||
EXTERN_MODULE(removables);
|
EXTERN_MODULE(removables);
|
||||||
#endif
|
#endif
|
||||||
|
#if defined(PLUGIN_ENABLED_RIVER)
|
||||||
|
EXTERN_MODULE(river);
|
||||||
|
#endif
|
||||||
#if defined(PLUGIN_ENABLED_SCRIPT)
|
#if defined(PLUGIN_ENABLED_SCRIPT)
|
||||||
EXTERN_MODULE(script);
|
EXTERN_MODULE(script);
|
||||||
#endif
|
#endif
|
||||||
|
@ -90,7 +93,6 @@ EXTERN_MODULE(xkb);
|
||||||
#if defined(PLUGIN_ENABLED_XWINDOW)
|
#if defined(PLUGIN_ENABLED_XWINDOW)
|
||||||
EXTERN_MODULE(xwindow);
|
EXTERN_MODULE(xwindow);
|
||||||
#endif
|
#endif
|
||||||
EXTERN_MODULE(river);
|
|
||||||
|
|
||||||
EXTERN_PARTICLE(empty);
|
EXTERN_PARTICLE(empty);
|
||||||
EXTERN_PARTICLE(list);
|
EXTERN_PARTICLE(list);
|
||||||
|
@ -202,6 +204,9 @@ init(void)
|
||||||
#if defined(PLUGIN_ENABLED_REMOVABLES)
|
#if defined(PLUGIN_ENABLED_REMOVABLES)
|
||||||
REGISTER_CORE_MODULE(removables, removables);
|
REGISTER_CORE_MODULE(removables, removables);
|
||||||
#endif
|
#endif
|
||||||
|
#if defined(PLUGIN_ENABLED_RIVER)
|
||||||
|
REGISTER_CORE_MODULE(river, river);
|
||||||
|
#endif
|
||||||
#if defined(PLUGIN_ENABLED_SCRIPT)
|
#if defined(PLUGIN_ENABLED_SCRIPT)
|
||||||
REGISTER_CORE_MODULE(script, script);
|
REGISTER_CORE_MODULE(script, script);
|
||||||
#endif
|
#endif
|
||||||
|
@ -214,9 +219,6 @@ init(void)
|
||||||
#if defined(PLUGIN_ENABLED_XWINDOW)
|
#if defined(PLUGIN_ENABLED_XWINDOW)
|
||||||
REGISTER_CORE_MODULE(xwindow, xwindow);
|
REGISTER_CORE_MODULE(xwindow, xwindow);
|
||||||
#endif
|
#endif
|
||||||
#if defined(HAVE_PLUGIN_river)
|
|
||||||
REGISTER_CORE_MODULE(river, river);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
REGISTER_CORE_PARTICLE(empty, empty);
|
REGISTER_CORE_PARTICLE(empty, empty);
|
||||||
REGISTER_CORE_PARTICLE(list, list);
|
REGISTER_CORE_PARTICLE(list, list);
|
||||||
|
|
Loading…
Add table
Reference in a new issue