meson: Move unit-file-related definitions to service_files/meson.build
In the spirit of keeping-things-that-are-together-together, move the
dependency declaration to where it's used. We only declare the
dependency on systemd to grab the unit directory path.
Change-Id: I5bdda184ade023ee38b0d33dd1c5a9c118bf3b8a
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
diff --git a/meson.build b/meson.build
index f66753a..d50c7e3 100644
--- a/meson.build
+++ b/meson.build
@@ -51,11 +51,6 @@
phosphor_logging_dep = dependency('phosphor-logging')
nlohmann_json_dep = dependency('nlohmann_json', include_type: 'system')
-systemd = dependency('systemd')
-systemd_system_unit_dir = systemd.get_variable(
- 'systemdsystemunitdir',
- pkgconfig_define: ['prefix', get_option('prefix')],
-)
threads = dependency('threads')
boost = dependency(
diff --git a/service_files/meson.build b/service_files/meson.build
index 80143bf..20bd84a 100644
--- a/service_files/meson.build
+++ b/service_files/meson.build
@@ -1,3 +1,9 @@
+systemd = dependency('systemd')
+systemd_system_unit_dir = systemd.get_variable(
+ 'systemdsystemunitdir',
+ pkgconfig_define: ['prefix', get_option('prefix')],
+)
+
unit_files = [
['adc', 'xyz.openbmc_project.adcsensor.service'],
['intel-cpu', 'xyz.openbmc_project.intelcpusensor.service'],