mirror of
https://codeberg.org/dnkl/yambar.git
synced 2025-04-20 03:35:41 +02:00
meson: make ‘xwindow’ plugin compile time optional
This commit is contained in:
parent
a14d38b0cb
commit
1a81255579
4 changed files with 14 additions and 8 deletions
|
@ -150,6 +150,7 @@ yambar = executable(
|
||||||
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' : [],
|
||||||
|
plugin_xwindow_enabled ? '-DPLUGIN_ENABLED_XWINDOW' : [],
|
||||||
],
|
],
|
||||||
build_rpath: '$ORIGIN/modules:$ORIGIN/decorations:$ORIGIN/particles',
|
build_rpath: '$ORIGIN/modules:$ORIGIN/decorations:$ORIGIN/particles',
|
||||||
export_dynamic: true,
|
export_dynamic: true,
|
||||||
|
@ -206,6 +207,7 @@ summary(
|
||||||
'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,
|
||||||
|
'XWindow': plugin_xwindow_enabled,
|
||||||
},
|
},
|
||||||
section: 'Optional modules',
|
section: 'Optional modules',
|
||||||
bool_yn: true
|
bool_yn: true
|
||||||
|
|
|
@ -42,3 +42,5 @@ option('plugin-sway-xkb', type: 'feature', value: 'auto',
|
||||||
description: 'keyboard support for Sway')
|
description: 'keyboard support for Sway')
|
||||||
option('plugin-xkb', type: 'feature', value: 'auto',
|
option('plugin-xkb', type: 'feature', value: 'auto',
|
||||||
description: 'keyboard support for X11')
|
description: 'keyboard support for X11')
|
||||||
|
option('plugin-xwindow', type: 'feature', value: 'auto',
|
||||||
|
description: 'XWindow support')
|
||||||
|
|
|
@ -45,6 +45,8 @@ plugin_sway_xkb_enabled = json_sway_xkb.found()
|
||||||
xcb_xkb = dependency('xcb-xkb', required: get_option('plugin-xkb'))
|
xcb_xkb = dependency('xcb-xkb', required: get_option('plugin-xkb'))
|
||||||
plugin_xkb_enabled = backend_x11 and xcb_xkb.found()
|
plugin_xkb_enabled = backend_x11 and xcb_xkb.found()
|
||||||
|
|
||||||
|
plugin_xwindow_enabled = backend_x11 and get_option('plugin-xwindow').allowed()
|
||||||
|
|
||||||
# Module name -> (source-list, dep-list)
|
# Module name -> (source-list, dep-list)
|
||||||
mod_data = {}
|
mod_data = {}
|
||||||
|
|
||||||
|
@ -120,10 +122,8 @@ if plugin_xkb_enabled
|
||||||
mod_data += {'xkb': [[], [xcb_stuff, xcb_xkb]]}
|
mod_data += {'xkb': [[], [xcb_stuff, xcb_xkb]]}
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if backend_x11
|
if plugin_xwindow_enabled
|
||||||
mod_data += {
|
mod_data += {'xwindow': [[], [xcb_stuff]]}
|
||||||
'xwindow': [[], [xcb_stuff]],
|
|
||||||
}
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if backend_wayland
|
if backend_wayland
|
||||||
|
|
10
plugin.c
10
plugin.c
|
@ -87,8 +87,10 @@ EXTERN_MODULE(sway_xkb);
|
||||||
#if defined(PLUGIN_ENABLED_XKB)
|
#if defined(PLUGIN_ENABLED_XKB)
|
||||||
EXTERN_MODULE(xkb);
|
EXTERN_MODULE(xkb);
|
||||||
#endif
|
#endif
|
||||||
EXTERN_MODULE(river);
|
#if defined(PLUGIN_ENABLED_XWINDOW)
|
||||||
EXTERN_MODULE(xwindow);
|
EXTERN_MODULE(xwindow);
|
||||||
|
#endif
|
||||||
|
EXTERN_MODULE(river);
|
||||||
|
|
||||||
EXTERN_PARTICLE(empty);
|
EXTERN_PARTICLE(empty);
|
||||||
EXTERN_PARTICLE(list);
|
EXTERN_PARTICLE(list);
|
||||||
|
@ -209,12 +211,12 @@ init(void)
|
||||||
#if defined(PLUGIN_ENABLED_XKB)
|
#if defined(PLUGIN_ENABLED_XKB)
|
||||||
REGISTER_CORE_MODULE(xkb, xkb);
|
REGISTER_CORE_MODULE(xkb, xkb);
|
||||||
#endif
|
#endif
|
||||||
|
#if defined(PLUGIN_ENABLED_XWINDOW)
|
||||||
|
REGISTER_CORE_MODULE(xwindow, xwindow);
|
||||||
|
#endif
|
||||||
#if defined(HAVE_PLUGIN_river)
|
#if defined(HAVE_PLUGIN_river)
|
||||||
REGISTER_CORE_MODULE(river, river);
|
REGISTER_CORE_MODULE(river, river);
|
||||||
#endif
|
#endif
|
||||||
#if defined(HAVE_PLUGIN_xwindow)
|
|
||||||
REGISTER_CORE_MODULE(xwindow, xwindow);
|
|
||||||
#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