blob: 4c420d79800199569d091704988261805882e7bc [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 = [
Patrick Williams9d583912025-02-01 08:37:58 -05003 ['smbios-mdrv2.service', ''],
4 ['xyz.openbmc_project.cpuinfo.service', 'cpuinfo'],
Jonathan Doman366546c2023-07-24 12:33:16 -07005]
6
7systemd_dep = dependency('systemd')
8systemd_system_unitdir = systemd_dep.get_variable(
Patrick Williams9d583912025-02-01 08:37:58 -05009 'systemd_system_unit_dir',
10 pkgconfig_define: ['rootprefix', get_option('prefix')],
11)
Jonathan Doman366546c2023-07-24 12:33:16 -070012
13foreach u : unit_files
Patrick Williams9d583912025-02-01 08:37:58 -050014 if u[1] == '' or get_option(u[1]).allowed()
15 install_data(u[0], install_dir: systemd_system_unitdir)
16 endif
Jonathan Doman366546c2023-07-24 12:33:16 -070017endforeach