Skip to content

Commit

Permalink
meson: autodetect systemd
Browse files Browse the repository at this point in the history
  • Loading branch information
fufexan committed Nov 11, 2024
1 parent ccfae82 commit 943c7d1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
8 changes: 6 additions & 2 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,12 @@ backtrace_dep = cpp_compiler.find_library('execinfo', required: false)
epoll_dep = dependency('epoll-shim', required: false) # timerfd on BSDs

# Handle options
if get_option('systemd').enabled()
systemd = dependency('systemd')
systemd_option = get_option('systemd')
systemd = dependency('systemd', required: systemd_option)
systemd_option.enable_auto_if(systemd.found())

if (systemd_option.enabled())
message('Enabling systemd integration')
add_project_arguments('-DUSES_SYSTEMD', language: 'cpp')
subdir('systemd')
endif
Expand Down
1 change: 0 additions & 1 deletion nix/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,6 @@ in
(mapAttrsToList mesonEnable {
"xwayland" = enableXWayland;
"legacy_renderer" = legacyRenderer;
"systemd" = withSystemd;
})
(mapAttrsToList mesonBool {
"b_pch" = false;
Expand Down

0 comments on commit 943c7d1

Please sign in to comment.