| 1 |
if get_option('systemd-system-service') or get_option('systemd-user-service') |
| 2 |
systemd_config = configuration_data() |
| 3 |
systemd_config.set('WP_BINARY', wireplumber_bin_dir / 'wireplumber') |
| 4 |
systemd_system_unit_dir = '' |
| 5 |
systemd_user_unit_dir = '' |
| 6 |
|
| 7 |
if systemd.found() |
| 8 |
systemd_system_unit_dir = systemd.get_variable( |
| 9 |
pkgconfig: 'systemdsystemunitdir', |
| 10 |
pkgconfig_define: ['prefix', get_option('prefix')]) |
| 11 |
systemd_user_unit_dir = systemd.get_variable( |
| 12 |
pkgconfig: 'systemduserunitdir', |
| 13 |
pkgconfig_define: ['prefix', get_option('prefix')]) |
| 14 |
endif |
| 15 |
|
| 16 |
# system service |
| 17 |
if get_option('systemd-system-service') |
| 18 |
if get_option('systemd-system-unit-dir') != '' |
| 19 |
systemd_system_unit_dir = get_option('systemd-system-unit-dir') |
| 20 |
endif |
| 21 |
|
| 22 |
if systemd_system_unit_dir != '' |
| 23 |
subdir('system') |
| 24 |
endif |
| 25 |
endif |
| 26 |
|
| 27 |
# user service |
| 28 |
if get_option('systemd-user-service') |
| 29 |
|
| 30 |
if get_option('systemd-user-unit-dir') != '' |
| 31 |
systemd_user_unit_dir = get_option('systemd-user-unit-dir') |
| 32 |
endif |
| 33 |
|
| 34 |
if systemd_user_unit_dir != '' |
| 35 |
subdir('user') |
| 36 |
endif |
| 37 |
endif |
| 38 |
endif |