build: require gio-unix-2.0 unconditionally
We already use it without checking (`<gio/gdesktopappinfo.h>` in wlr/taskbar), it's a transitive dependency of GTK and it's always available on Unix platforms.pull/2926/head
parent
104accdc34
commit
72406fa3f2
|
@ -80,8 +80,8 @@
|
||||||
#ifdef HAVE_LIBSNDIO
|
#ifdef HAVE_LIBSNDIO
|
||||||
#include "modules/sndio.hpp"
|
#include "modules/sndio.hpp"
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_GIO_UNIX
|
|
||||||
#include "modules/bluetooth.hpp"
|
#include "modules/bluetooth.hpp"
|
||||||
|
#ifdef HAVE_LOGIND_INHIBITOR
|
||||||
#include "modules/inhibitor.hpp"
|
#include "modules/inhibitor.hpp"
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_LIBJACK
|
#ifdef HAVE_LIBJACK
|
||||||
|
|
23
meson.build
23
meson.build
|
@ -75,10 +75,7 @@ wayland_cursor = dependency('wayland-cursor')
|
||||||
wayland_protos = dependency('wayland-protocols')
|
wayland_protos = dependency('wayland-protocols')
|
||||||
gtkmm = dependency('gtkmm-3.0', version : ['>=3.22.0'])
|
gtkmm = dependency('gtkmm-3.0', version : ['>=3.22.0'])
|
||||||
dbusmenu_gtk = dependency('dbusmenu-gtk3-0.4', required: get_option('dbusmenu-gtk'))
|
dbusmenu_gtk = dependency('dbusmenu-gtk3-0.4', required: get_option('dbusmenu-gtk'))
|
||||||
giounix = dependency('gio-unix-2.0', required: (get_option('dbusmenu-gtk').enabled() or
|
giounix = dependency('gio-unix-2.0')
|
||||||
get_option('logind').enabled() or
|
|
||||||
get_option('upower_glib').enabled() or
|
|
||||||
get_option('mpris').enabled()))
|
|
||||||
jsoncpp = dependency('jsoncpp', version : ['>=1.9.2'], fallback : ['jsoncpp', 'jsoncpp_dep'])
|
jsoncpp = dependency('jsoncpp', version : ['>=1.9.2'], fallback : ['jsoncpp', 'jsoncpp_dep'])
|
||||||
sigcpp = dependency('sigc++-2.0')
|
sigcpp = dependency('sigc++-2.0')
|
||||||
libinotify = dependency('libinotify', required: false)
|
libinotify = dependency('libinotify', required: false)
|
||||||
|
@ -165,6 +162,7 @@ src_files = files(
|
||||||
'src/ALabel.cpp',
|
'src/ALabel.cpp',
|
||||||
'src/AIconLabel.cpp',
|
'src/AIconLabel.cpp',
|
||||||
'src/AAppIconLabel.cpp',
|
'src/AAppIconLabel.cpp',
|
||||||
|
'src/modules/bluetooth.cpp',
|
||||||
'src/modules/custom.cpp',
|
'src/modules/custom.cpp',
|
||||||
'src/modules/disk.cpp',
|
'src/modules/disk.cpp',
|
||||||
'src/modules/idle_inhibitor.cpp',
|
'src/modules/idle_inhibitor.cpp',
|
||||||
|
@ -272,12 +270,13 @@ if libnl.found() and libnlgen.found()
|
||||||
src_files += 'src/modules/network.cpp'
|
src_files += 'src/modules/network.cpp'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if (giounix.found() and not get_option('logind').disabled())
|
if not get_option('logind').disabled()
|
||||||
add_project_arguments('-DHAVE_GAMEMODE', language: 'cpp')
|
add_project_arguments('-DHAVE_GAMEMODE', '-DHAVE_LOGIND_INHIBITOR', language: 'cpp')
|
||||||
src_files += 'src/modules/gamemode.cpp'
|
src_files += 'src/modules/gamemode.cpp'
|
||||||
|
src_files += 'src/modules/inhibitor.cpp'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if (upower_glib.found() and giounix.found() and not get_option('logind').disabled())
|
if (upower_glib.found() and not get_option('logind').disabled())
|
||||||
add_project_arguments('-DHAVE_UPOWER', language: 'cpp')
|
add_project_arguments('-DHAVE_UPOWER', language: 'cpp')
|
||||||
src_files += 'src/modules/upower/upower.cpp'
|
src_files += 'src/modules/upower/upower.cpp'
|
||||||
src_files += 'src/modules/upower/upower_tooltip.cpp'
|
src_files += 'src/modules/upower/upower_tooltip.cpp'
|
||||||
|
@ -291,7 +290,7 @@ if (pipewire.found())
|
||||||
src_files += 'src/util/pipewire_backend.cpp'
|
src_files += 'src/util/pipewire_backend.cpp'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if (playerctl.found() and giounix.found() and not get_option('logind').disabled())
|
if (playerctl.found() and not get_option('logind').disabled())
|
||||||
add_project_arguments('-DHAVE_MPRIS', language: 'cpp')
|
add_project_arguments('-DHAVE_MPRIS', language: 'cpp')
|
||||||
src_files += 'src/modules/mpris/mpris.cpp'
|
src_files += 'src/modules/mpris/mpris.cpp'
|
||||||
endif
|
endif
|
||||||
|
@ -351,12 +350,6 @@ if libsndio.found()
|
||||||
src_files += 'src/modules/sndio.cpp'
|
src_files += 'src/modules/sndio.cpp'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if (giounix.found() and not get_option('logind').disabled())
|
|
||||||
add_project_arguments('-DHAVE_GIO_UNIX', language: 'cpp')
|
|
||||||
src_files += 'src/modules/inhibitor.cpp'
|
|
||||||
src_files += 'src/modules/bluetooth.cpp'
|
|
||||||
endif
|
|
||||||
|
|
||||||
if get_option('rfkill').enabled() and is_linux
|
if get_option('rfkill').enabled() and is_linux
|
||||||
add_project_arguments('-DWANT_RFKILL', language: 'cpp')
|
add_project_arguments('-DWANT_RFKILL', language: 'cpp')
|
||||||
src_files += files(
|
src_files += files(
|
||||||
|
@ -500,7 +493,7 @@ if scdoc.found()
|
||||||
'waybar-dwl-tags.5.scd',
|
'waybar-dwl-tags.5.scd',
|
||||||
]
|
]
|
||||||
|
|
||||||
if (giounix.found() and not get_option('logind').disabled())
|
if not get_option('logind').disabled()
|
||||||
man_files += 'waybar-inhibitor.5.scd'
|
man_files += 'waybar-inhibitor.5.scd'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
|
@ -178,10 +178,10 @@ waybar::AModule* waybar::Factory::makeModule(const std::string& name,
|
||||||
return new waybar::modules::Sndio(id, config_[name]);
|
return new waybar::modules::Sndio(id, config_[name]);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_GIO_UNIX
|
|
||||||
if (ref == "bluetooth") {
|
if (ref == "bluetooth") {
|
||||||
return new waybar::modules::Bluetooth(id, config_[name]);
|
return new waybar::modules::Bluetooth(id, config_[name]);
|
||||||
}
|
}
|
||||||
|
#ifdef HAVE_LOGIND_INHIBITOR
|
||||||
if (ref == "inhibitor") {
|
if (ref == "inhibitor") {
|
||||||
return new waybar::modules::Inhibitor(id, bar_, config_[name]);
|
return new waybar::modules::Inhibitor(id, bar_, config_[name]);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue