Add default systemd feature flag to enable systemd integration
The `libsystemd` crate fails to build on FreeBSD and is presumably undesirable on any non-systemd distros. At least at present it's easy to make it optional.
This commit is contained in:
parent
4890bfb029
commit
9fa8037809
2 changed files with 5 additions and 2 deletions
|
|
@ -27,7 +27,7 @@ xkbcommon = "0.4"
|
||||||
indexmap = "1.8.0"
|
indexmap = "1.8.0"
|
||||||
xdg = "^2.1"
|
xdg = "^2.1"
|
||||||
ron = "0.7"
|
ron = "0.7"
|
||||||
libsystemd = "0.5"
|
libsystemd = { version = "0.5", optional = true }
|
||||||
wayland-backend = "0.1.0"
|
wayland-backend = "0.1.0"
|
||||||
wayland-scanner = "0.30.0"
|
wayland-scanner = "0.30.0"
|
||||||
cosmic-protocols = { git = "https://github.com/pop-os/cosmic-protocols", branch = "main", default-features = false, features = ["server"] }
|
cosmic-protocols = { git = "https://github.com/pop-os/cosmic-protocols", branch = "main", default-features = false, features = ["server"] }
|
||||||
|
|
@ -53,8 +53,9 @@ features = ["svg"]
|
||||||
optional = true
|
optional = true
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = []
|
default = ["systemd"]
|
||||||
debug = ["egui", "smithay-egui", "renderdoc", "anyhow/backtrace"]
|
debug = ["egui", "smithay-egui", "renderdoc", "anyhow/backtrace"]
|
||||||
|
systemd = ["libsystemd"]
|
||||||
|
|
||||||
[profile.dev]
|
[profile.dev]
|
||||||
lto = "thin"
|
lto = "thin"
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,7 @@ mod logger;
|
||||||
pub mod session;
|
pub mod session;
|
||||||
pub mod shell;
|
pub mod shell;
|
||||||
pub mod state;
|
pub mod state;
|
||||||
|
#[cfg(feature = "systemd")]
|
||||||
pub mod systemd;
|
pub mod systemd;
|
||||||
pub mod utils;
|
pub mod utils;
|
||||||
pub mod wayland;
|
pub mod wayland;
|
||||||
|
|
@ -46,6 +47,7 @@ fn main() -> Result<()> {
|
||||||
// init backend
|
// init backend
|
||||||
backend::init_backend_auto(&display.handle(), &mut event_loop, &mut state)?;
|
backend::init_backend_auto(&display.handle(), &mut event_loop, &mut state)?;
|
||||||
// potentially tell systemd we are setup now
|
// potentially tell systemd we are setup now
|
||||||
|
#[cfg(feature = "systemd")]
|
||||||
if let state::BackendData::Kms(_) = &state.backend {
|
if let state::BackendData::Kms(_) = &state.backend {
|
||||||
systemd::ready(&state);
|
systemd::ready(&state);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue