mirror of
https://codeberg.org/dnkl/yambar.git
synced 2025-04-25 05:15:41 +02:00
Merge branch 'make-mpd-support-optional'
This commit is contained in:
commit
185f313580
5 changed files with 26 additions and 2 deletions
|
@ -11,6 +11,9 @@
|
|||
## Unreleased
|
||||
### Added
|
||||
### Changed
|
||||
|
||||
* Made `libmpdclient` an optional dependency
|
||||
|
||||
### Deprecated
|
||||
### Removed
|
||||
### Fixed
|
||||
|
@ -22,6 +25,7 @@
|
|||
### Security
|
||||
### Contributors
|
||||
|
||||
* [sochotnicky](https://codeberg.org/sochotnicky)
|
||||
|
||||
## 1.7.0
|
||||
|
||||
|
|
|
@ -119,6 +119,7 @@ yambar = executable(
|
|||
version,
|
||||
dependencies: [bar, pixman, yaml, threads, dl, tllist, fcft] +
|
||||
decorations + particles + modules,
|
||||
c_args: [plugin_mpd_enabled? '-DPLUGIN_ENABLED_MPD':[]],
|
||||
build_rpath: '$ORIGIN/modules:$ORIGIN/decorations:$ORIGIN/particles',
|
||||
export_dynamic: true,
|
||||
install: true,
|
||||
|
@ -153,3 +154,9 @@ summary(
|
|||
},
|
||||
bool_yn: true
|
||||
)
|
||||
|
||||
summary(
|
||||
{'Music Player Daemon (MPD)': plugin_mpd_enabled},
|
||||
section: 'Optional modules',
|
||||
bool_yn: true
|
||||
)
|
||||
|
|
|
@ -5,3 +5,6 @@ option(
|
|||
option(
|
||||
'core-plugins-as-shared-libraries', type: 'boolean', value: false,
|
||||
description: 'Compiles modules, particles and decorations as shared libraries, which are loaded on-demand')
|
||||
option(
|
||||
'plugin-mpd', type: 'feature', value: 'auto',
|
||||
description: 'Music Player Daemon (MPD) support')
|
||||
|
|
|
@ -5,9 +5,12 @@ modules = []
|
|||
alsa = dependency('alsa')
|
||||
udev = dependency('libudev')
|
||||
json = dependency('json-c')
|
||||
mpd = dependency('libmpdclient')
|
||||
xcb_xkb = dependency('xcb-xkb', required: get_option('backend-x11'))
|
||||
|
||||
# Optional deps
|
||||
mpd = dependency('libmpdclient', required: get_option('plugin-mpd'))
|
||||
plugin_mpd_enabled = mpd.found()
|
||||
|
||||
# Module name -> (source-list, dep-list)
|
||||
mod_data = {
|
||||
'alsa': [[], [m, alsa]],
|
||||
|
@ -16,13 +19,16 @@ mod_data = {
|
|||
'clock': [[], []],
|
||||
'i3': [['i3-common.c', 'i3-common.h'], [dynlist, json]],
|
||||
'label': [[], []],
|
||||
'mpd': [[], [mpd]],
|
||||
'network': [[], []],
|
||||
'removables': [[], [dynlist, udev]],
|
||||
'script': [[], []],
|
||||
'sway-xkb': [['i3-common.c', 'i3-common.h'], [dynlist, json]],
|
||||
}
|
||||
|
||||
if plugin_mpd_enabled
|
||||
mod_data += {'mpd': [[], [mpd]]}
|
||||
endif
|
||||
|
||||
if backend_x11
|
||||
mod_data += {
|
||||
'xkb': [[], [xcb_stuff, xcb_xkb]],
|
||||
|
|
4
plugin.c
4
plugin.c
|
@ -39,7 +39,9 @@ EXTERN_MODULE(clock);
|
|||
EXTERN_MODULE(foreign_toplevel);
|
||||
EXTERN_MODULE(i3);
|
||||
EXTERN_MODULE(label);
|
||||
#if defined(PLUGIN_ENABLED_MPD)
|
||||
EXTERN_MODULE(mpd);
|
||||
#endif
|
||||
EXTERN_MODULE(network);
|
||||
EXTERN_MODULE(removables);
|
||||
EXTERN_MODULE(river);
|
||||
|
@ -117,7 +119,9 @@ init(void)
|
|||
#endif
|
||||
REGISTER_CORE_MODULE(i3, i3);
|
||||
REGISTER_CORE_MODULE(label, label);
|
||||
#if defined(PLUGIN_ENABLED_MPD)
|
||||
REGISTER_CORE_MODULE(mpd, mpd);
|
||||
#endif
|
||||
REGISTER_CORE_MODULE(network, network);
|
||||
REGISTER_CORE_MODULE(removables, removables);
|
||||
#if defined(HAVE_PLUGIN_river)
|
||||
|
|
Loading…
Add table
Reference in a new issue