From 0d14fd9136d7dbd731b02ce8501ff725f11b71cc Mon Sep 17 00:00:00 2001 From: jrun Date: Thu, 5 Jan 2023 14:17:55 -0500 Subject: add systemd support (#1253) * add systemd support motivation for this is is proper ordering of related/bound/required services to Hyprland (e.g. swaybg) that would need to have a compositor ready. this could possibly be a build-time option of course. see also: example/ files for example of services Signed-off-by: Paymon MARANDI * nix: add withSystemd flag Signed-off-by: Paymon MARANDI Co-authored-by: Mihai Fufezan Co-authored-by: Vaxerski --- meson.build | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'meson.build') diff --git a/meson.build b/meson.build index 3ca2b578..73c84abf 100644 --- a/meson.build +++ b/meson.build @@ -50,6 +50,16 @@ if not have_xwayland add_project_arguments('-DNO_XWAYLAND', language: 'cpp') endif +systemd_dep = dependency('libsystemd', required: get_option('systemd')) + +if get_option('systemd').enabled() + if systemd_dep.found() + add_project_arguments('-DUSES_SYSTEMD', language: 'cpp') + else + error('Cannot enable systemd in Hyprland: libsystemd was not found') + endif +endif + if get_option('buildtype') == 'debug' add_project_arguments('-DHYPRLAND_DEBUG', language: 'cpp') endif -- cgit v1.2.3