The open source OpenXR runtime
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

systemd: Use pkgconfig variable systemduserunitdir as unit install directory

authored by

Colin Kinloch and committed by
Christoph Haag
0a783ca2 1b3dadbe

+17 -7
+2 -1
meson.build
··· 77 77 zlib = dependency('zlib', required: false) 78 78 survive = dependency('survive', required: false) 79 79 dbus = dependency('dbus-1', required: get_option('dbus')) 80 - systemd = dependency('libsystemd', required: get_option('systemd')) 80 + systemd = dependency('systemd', required: get_option('systemd')) 81 + systemd_dep = dependency('libsystemd', required: get_option('systemd')) 81 82 libbsd = dependency('libbsd', required: get_option('libbsd')) 82 83 gst = dependency('gstreamer-1.0', required: false) 83 84 gst_app = dependency('gstreamer-app-1.0', required: false)
+5
meson_options.txt
··· 163 163 value: true, 164 164 description: 'Log in color' 165 165 ) 166 + 167 + option('systemd-user-unit-dir', 168 + type: 'string', 169 + description: 'Directory for user systemd units (defaults to /usr/lib/systemd/user)' 170 + )
+1 -1
src/xrt/include/xrt/meson.build
··· 76 76 have_conf.set('XRT_HAVE_DBUS', true) 77 77 endif 78 78 79 - if systemd.found() and not get_option('systemd').disabled() 79 + if systemd_dep.found() and not get_option('systemd').disabled() 80 80 have_conf.set('XRT_HAVE_SYSTEMD', true) 81 81 endif 82 82
+9 -5
src/xrt/targets/service/meson.build
··· 2 2 # SPDX-License-Identifier: BSL-1.0 3 3 4 4 service_deps = [pthreads, libjpeg] 5 - if systemd.found() and not get_option('systemd').disabled() 6 - service_deps += systemd 5 + if systemd_dep.found() and not get_option('systemd').disabled() 6 + service_deps += systemd_dep 7 7 endif 8 8 9 9 hack_deps = [] ··· 52 52 ) 53 53 54 54 service_install_path = join_paths(get_option('prefix'), 'bin', 'monado-service') 55 - systemd_dir = join_paths(get_option('prefix'), get_option('libdir'), 'systemd', 'user') 55 + systemd_user_services_dir = systemd.get_pkgconfig_variable('systemduserunitdir', define_variable : [ 'prefix', get_option('prefix')]) 56 + if get_option('systemd-user-unit-dir') != '' 57 + systemd_user_services_dir = get_option('systemd-user-unit-dir') 58 + endif 59 + 56 60 57 61 service_conf_data = configuration_data() 58 62 service_conf_data.set('UNIT_NAME', 'monado') ··· 64 68 input: 'monado.in.service', 65 69 output: 'monado.service', 66 70 configuration: service_conf_data, 67 - install_dir: systemd_dir 71 + install_dir: systemd_user_services_dir 68 72 ) 69 73 70 74 socket_conf_data = configuration_data() ··· 74 78 input: 'monado.in.socket', 75 79 output: 'monado.socket', 76 80 configuration: socket_conf_data, 77 - install_dir: systemd_dir 81 + install_dir: systemd_user_services_dir 78 82 )