Skip to content

Commit d0f6f8d

Browse files
authored
Systemd optional (#2768)
1 parent 6c3b8c0 commit d0f6f8d

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

filechooser-portal/meson.build

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,12 @@ conf_data = configuration_data()
2222
conf_data.set('libexecdir', libexec_dir)
2323

2424
systemd_systemduserunitdir = get_option('systemduserunitdir')
25-
if systemd_systemduserunitdir != 'no'
25+
systemd_dep = dependency('systemd', version: '>= 206', required: false)
2626

27-
if systemd_systemduserunitdir == ''
28-
systemd_dep = dependency('systemd', version: '>= 206', required: false)
29-
assert(systemd_dep.found(), 'systemd required but not found, please provide a valid systemd user unit dir or disable it')
30-
systemd_systemduserunitdir = systemd_dep.get_variable('systemduserunitdir', pkgconfig_define: ['prefix', get_option('prefix')])
31-
endif
27+
if (systemd_dep.found () and systemd_systemduserunitdir != 'no')
28+
if systemd_systemduserunitdir == ''
29+
systemd_systemduserunitdir = systemd_dep.get_variable('systemduserunitdir', pkgconfig_define: ['prefix', get_option('prefix')])
30+
endif
3231

3332
configure_file(
3433
input: 'io.elementary.files.xdg-desktop-portal.service.in',

0 commit comments

Comments
 (0)