1project('phosphor-psu-code-mgmt', 'cpp',
2        version: '0.1', meson_version: '>=0.49.0',
3        default_options: [
4          'warning_level=3',
5          'werror=true',
6          'cpp_std=c++17',
7          'b_lto=true',
8        ])
9
10systemd = dependency('systemd')
11servicedir = systemd.get_pkgconfig_variable('systemdsystemunitdir')
12
13configure_file(input: 'service/xyz.openbmc_project.Software.Psu.Updater.service',
14               output: 'xyz.openbmc_project.Software.Psu.Updater.service',
15               copy: true,
16               install_dir: servicedir)
17
18# Common configurations for src and test
19cdata = configuration_data()
20cdata.set_quoted('ITEM_IFACE', 'xyz.openbmc_project.Inventory.Item')
21cdata.set_quoted('VERSION_IFACE', 'xyz.openbmc_project.Software.Version')
22cdata.set_quoted('FILEPATH_IFACE', 'xyz.openbmc_project.Common.FilePath')
23cdata.set_quoted('BUSNAME_UPDATER', 'xyz.openbmc_project.Software.Psu.Updater')
24cdata.set_quoted('PSU_INVENTORY_IFACE', 'xyz.openbmc_project.Inventory.Item.PowerSupply')
25cdata.set_quoted('ACTIVATION_FWD_ASSOCIATION', 'inventory')
26cdata.set_quoted('ACTIVATION_REV_ASSOCIATION', 'activation')
27cdata.set_quoted('ACTIVE_FWD_ASSOCIATION', 'active')
28cdata.set_quoted('ACTIVE_REV_ASSOCIATION', 'software_version')
29cdata.set_quoted('FUNCTIONAL_FWD_ASSOCIATION', 'functional')
30cdata.set_quoted('FUNCTIONAL_REV_ASSOCIATION', 'software_version')
31cdata.set_quoted('VERSION', 'Version')
32cdata.set_quoted('PRESENT', 'Present')
33
34cdata.set_quoted('SOFTWARE_OBJPATH', get_option('SOFTWARE_OBJPATH'))
35cdata.set_quoted('MANIFEST_FILE', get_option('MANIFEST_FILE'))
36cdata.set_quoted('PSU_INVENTORY_PATH_BASE', get_option('PSU_INVENTORY_PATH_BASE'))
37cdata.set_quoted('PSU_VERSION_UTIL', get_option('PSU_VERSION_UTIL'))
38
39phosphor_dbus_interfaces = dependency('phosphor-dbus-interfaces')
40phosphor_logging = dependency('phosphor-logging')
41sdbusplus = dependency('sdbusplus')
42ssl = dependency('openssl')
43
44add_project_link_arguments(['-lstdc++fs'], language: 'cpp')
45
46subdir('src')
47
48build_tests = get_option('tests')
49build_examples = get_option('examples')
50
51if build_examples
52  subdir('vendor-example')
53endif
54
55if not build_tests.disabled()
56  subdir('test')
57endif
58