Skip to content

Commit

Permalink
check systemd unit dir from systemd.pc in meson
Browse files Browse the repository at this point in the history
  • Loading branch information
mxjeff committed Apr 11, 2023
1 parent a57bcd0 commit 0d2f67b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions systemd/system/meson.build
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
systemd_system_unit_dir = get_option('systemd_system_unit_dir')
if systemd_system_unit_dir == ''
systemd = dependency('systemd', required: false)
if systemd.found()
systemd_system_unit_dir = systemd.get_pkgconfig_variable('systemdsystemunitdir')
endif
endif
if systemd_system_unit_dir == ''
systemd_system_unit_dir = join_paths(get_option('prefix'), 'lib', 'systemd', 'system')
endif
Expand Down
6 changes: 6 additions & 0 deletions systemd/user/meson.build
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
systemd_user_unit_dir = get_option('systemd_user_unit_dir')
if systemd_user_unit_dir == ''
systemd = dependency('systemd', required: false)
if systemd.found()
systemd_user_unit_dir = systemd.get_pkgconfig_variable('systemduserunitdir')
endif
endif
if systemd_user_unit_dir == ''
systemd_user_unit_dir = join_paths(get_option('prefix'), 'lib', 'systemd', 'user')
endif
Expand Down

0 comments on commit 0d2f67b

Please sign in to comment.