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')
12subdir('services')
13
14# Common configurations for src and test
15cdata = configuration_data()
16cdata.set_quoted('ITEM_IFACE', 'xyz.openbmc_project.Inventory.Item')
17cdata.set_quoted('ASSET_IFACE', 'xyz.openbmc_project.Inventory.Decorator.Asset')
18cdata.set_quoted('VERSION_IFACE', 'xyz.openbmc_project.Software.Version')
19cdata.set_quoted('FILEPATH_IFACE', 'xyz.openbmc_project.Common.FilePath')
20cdata.set_quoted('BUSNAME_UPDATER', 'xyz.openbmc_project.Software.Psu.Updater')
21cdata.set_quoted('PSU_INVENTORY_IFACE', 'xyz.openbmc_project.Inventory.Item.PowerSupply')
22cdata.set_quoted('ACTIVATION_FWD_ASSOCIATION', 'inventory')
23cdata.set_quoted('ACTIVATION_REV_ASSOCIATION', 'activation')
24cdata.set_quoted('ACTIVE_FWD_ASSOCIATION', 'active')
25cdata.set_quoted('ACTIVE_REV_ASSOCIATION', 'software_version')
26cdata.set_quoted('FUNCTIONAL_FWD_ASSOCIATION', 'functional')
27cdata.set_quoted('FUNCTIONAL_REV_ASSOCIATION', 'software_version')
28cdata.set_quoted('VERSION', 'Version')
29cdata.set_quoted('PRESENT', 'Present')
30cdata.set_quoted('MANUFACTURER', 'Manufacturer')
31cdata.set_quoted('MODEL', 'Model')
32
33cdata.set_quoted('SOFTWARE_OBJPATH', get_option('SOFTWARE_OBJPATH'))
34cdata.set_quoted('MANIFEST_FILE', get_option('MANIFEST_FILE'))
35cdata.set_quoted('PSU_INVENTORY_PATH_BASE', get_option('PSU_INVENTORY_PATH_BASE'))
36cdata.set_quoted('PSU_VERSION_UTIL', get_option('PSU_VERSION_UTIL'))
37cdata.set_quoted('PSU_VERSION_COMPARE_UTIL', get_option('PSU_VERSION_COMPARE_UTIL'))
38cdata.set_quoted('PSU_UPDATE_SERVICE', get_option('PSU_UPDATE_SERVICE'))
39cdata.set_quoted('IMG_DIR', get_option('IMG_DIR'))
40cdata.set_quoted('IMG_DIR_PERSIST', get_option('IMG_DIR_PERSIST'))
41cdata.set_quoted('IMG_DIR_BUILTIN', get_option('IMG_DIR_BUILTIN'))
42
43phosphor_dbus_interfaces = dependency('phosphor-dbus-interfaces')
44phosphor_logging = dependency('phosphor-logging')
45sdbusplus = dependency('sdbusplus')
46ssl = dependency('openssl')
47
48add_project_link_arguments(['-lstdc++fs'], language: 'cpp')
49
50subdir('src')
51
52build_tests = get_option('tests')
53build_examples = get_option('examples')
54
55if build_examples
56  subdir('vendor-example')
57endif
58
59if not build_tests.disabled()
60  subdir('test')
61endif
62