build: make dep_systemd optional for the sake of Travis
Unless we start using more recent CI images, we must disable dep_systemd
for the default configuration to make Travis happy. Yey...
@@ -22,14 +22,20 @@ dep_csundry = dependency('libcsundry', version: '>=1', fallback: [ 'c-sundry', '
dep_glib = dependency('glib-2.0', version: '>=2.50', required: false)
dep_libsystemd = dependency('libsystemd', version: '>=230', required: false)
dep_math = cc.find_library('m')
-dep_systemd = dependency('systemd')
+dep_systemd = dependency('systemd', required: false)
dep_thread = dependency('threads')
dep_expat = dependency('expat')
conf.set('bindir', join_paths(get_option('prefix'), get_option('bindir')))
+
+if dep_systemd.found()
conf.set('systemunitdir', dep_systemd.get_pkgconfig_variable('systemdsystemunitdir'))
conf.set('userunitdir', dep_systemd.get_pkgconfig_variable('systemduserunitdir'))
+endif
subdir('src')
+
+if dep_systemd.found()
subdir('units/system')
subdir('units/user')
+endif
