Limit dbus dependency to target_os = "linux"
parent
9a9c876f4a
commit
57e6cf3980
|
@ -40,7 +40,6 @@ toml = { version = "0.5.6", features = ["preserve_order", ] }
|
||||||
indexmap = { version = "^1.5", features = ["serde-1", ] }
|
indexmap = { version = "^1.5", features = ["serde-1", ] }
|
||||||
linkify = "0.4.0"
|
linkify = "0.4.0"
|
||||||
notify = "4.0.1" # >:c
|
notify = "4.0.1" # >:c
|
||||||
notify-rust = { version = "^4", optional = true }
|
|
||||||
termion = "1.5.1"
|
termion = "1.5.1"
|
||||||
bincode = "1.2.0"
|
bincode = "1.2.0"
|
||||||
uuid = { version = "0.8.1", features = ["serde", "v4"] }
|
uuid = { version = "0.8.1", features = ["serde", "v4"] }
|
||||||
|
@ -55,6 +54,9 @@ futures = "0.3.5"
|
||||||
async-task = "3.0.0"
|
async-task = "3.0.0"
|
||||||
num_cpus = "1.12.0"
|
num_cpus = "1.12.0"
|
||||||
flate2 = { version = "1.0.16", optional = true }
|
flate2 = { version = "1.0.16", optional = true }
|
||||||
|
|
||||||
|
[target.'cfg(target_os="linux")'.dependencies]
|
||||||
|
notify-rust = { version = "^4", optional = true }
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
syn = { version = "1.0.31", features = [] }
|
syn = { version = "1.0.31", features = [] }
|
||||||
|
|
|
@ -375,7 +375,7 @@ fn run_app(opt: Opt) -> Result<()> {
|
||||||
let status_bar = Box::new(StatusBar::new(&state.context, window));
|
let status_bar = Box::new(StatusBar::new(&state.context, window));
|
||||||
state.register_component(status_bar);
|
state.register_component(status_bar);
|
||||||
|
|
||||||
#[cfg(feature = "dbus-notifications")]
|
#[cfg(all(target_os = "linux", feature = "dbus-notifications"))]
|
||||||
{
|
{
|
||||||
let dbus_notifications = Box::new(components::notifications::DbusNotifications::new());
|
let dbus_notifications = Box::new(components::notifications::DbusNotifications::new());
|
||||||
state.register_component(dbus_notifications);
|
state.register_component(dbus_notifications);
|
||||||
|
|
|
@ -26,10 +26,10 @@ use std::process::{Command, Stdio};
|
||||||
|
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
||||||
#[cfg(feature = "dbus-notifications")]
|
#[cfg(all(target_os = "linux", feature = "dbus-notifications"))]
|
||||||
pub use dbus::*;
|
pub use dbus::*;
|
||||||
|
|
||||||
#[cfg(feature = "dbus-notifications")]
|
#[cfg(all(target_os = "linux", feature = "dbus-notifications"))]
|
||||||
mod dbus {
|
mod dbus {
|
||||||
use super::*;
|
use super::*;
|
||||||
use crate::types::RateLimit;
|
use crate::types::RateLimit;
|
||||||
|
|
Loading…
Reference in New Issue