blob: 30a59a9e39356055b4dbc229afa77defd453cdb4 [file] [log] [blame]
Jonathan Doman366546c2023-07-24 12:33:16 -07001# Map of unit file to meson option which controls whether file gets installed
2unit_files = [
3 ['smbios-mdrv2.service', ''],
4 ['xyz.openbmc_project.cpuinfo.service', 'cpuinfo'],
5]
6
7systemd_dep = dependency('systemd')
8systemd_system_unitdir = systemd_dep.get_variable(
9 'systemd_system_unit_dir',
10 pkgconfig_define: ['rootprefix', get_option('prefix')]
11 )
12
13foreach u : unit_files
14 if u[1] == '' or get_option(u[1]).allowed()
15 install_data(u[0], install_dir: systemd_system_unitdir)
16 endif
17endforeach