xref: /openbmc/phosphor-psu-code-mgmt/meson.build (revision 783406e649e90e13540f192f4111270a02d83168)
1project('phosphor-psu-code-mgmt', 'cpp',
2        version: '0.1',
3        meson_version: '>=1.1.1',
4        default_options: [
5          'warning_level=3',
6          'werror=true',
7          'cpp_std=c++23',
8          'b_lto=true',
9        ])
10
11systemd = dependency('systemd')
12servicedir = systemd.get_variable('systemdsystemunitdir')
13subdir('services')
14
15# Common configurations for src and test
16cdata = configuration_data()
17cdata.set_quoted('ITEM_IFACE', 'xyz.openbmc_project.Inventory.Item')
18cdata.set_quoted('ASSET_IFACE', 'xyz.openbmc_project.Inventory.Decorator.Asset')
19cdata.set_quoted('VERSION_IFACE', 'xyz.openbmc_project.Software.Version')
20cdata.set_quoted('FILEPATH_IFACE', 'xyz.openbmc_project.Common.FilePath')
21cdata.set_quoted('BUSNAME_UPDATER', 'xyz.openbmc_project.Software.Psu.Updater')
22cdata.set_quoted('PSU_INVENTORY_IFACE', 'xyz.openbmc_project.Inventory.Item.PowerSupply')
23cdata.set_quoted('ACTIVATION_FWD_ASSOCIATION', 'inventory')
24cdata.set_quoted('ACTIVATION_REV_ASSOCIATION', 'activation')
25cdata.set_quoted('ACTIVE_FWD_ASSOCIATION', 'active')
26cdata.set_quoted('ACTIVE_REV_ASSOCIATION', 'software_version')
27cdata.set_quoted('FUNCTIONAL_FWD_ASSOCIATION', 'functional')
28cdata.set_quoted('FUNCTIONAL_REV_ASSOCIATION', 'software_version')
29cdata.set_quoted('UPDATEABLE_FWD_ASSOCIATION', 'updateable')
30cdata.set_quoted('UPDATEABLE_REV_ASSOCIATION', 'software_version')
31cdata.set_quoted('VERSION', 'Version')
32cdata.set_quoted('PRESENT', 'Present')
33cdata.set_quoted('MANUFACTURER', 'Manufacturer')
34cdata.set_quoted('MODEL', 'Model')
35
36cdata.set_quoted('SOFTWARE_OBJPATH', get_option('SOFTWARE_OBJPATH'))
37cdata.set_quoted('MANIFEST_FILE', get_option('MANIFEST_FILE'))
38cdata.set_quoted('PSU_INVENTORY_PATH_BASE', get_option('PSU_INVENTORY_PATH_BASE'))
39cdata.set_quoted('PSU_VERSION_UTIL', get_option('PSU_VERSION_UTIL'))
40cdata.set_quoted('PSU_MODEL_UTIL', get_option('PSU_MODEL_UTIL'))
41cdata.set_quoted('PSU_VERSION_COMPARE_UTIL', get_option('PSU_VERSION_COMPARE_UTIL'))
42cdata.set_quoted('PSU_UPDATE_SERVICE', get_option('PSU_UPDATE_SERVICE'))
43cdata.set_quoted('IMG_DIR', get_option('IMG_DIR'))
44cdata.set_quoted('IMG_DIR_PERSIST', get_option('IMG_DIR_PERSIST'))
45cdata.set_quoted('IMG_DIR_BUILTIN', get_option('IMG_DIR_BUILTIN'))
46
47cdata.set10('ALWAYS_USE_BUILTIN_IMG_DIR', get_option('ALWAYS_USE_BUILTIN_IMG_DIR'))
48
49phosphor_dbus_interfaces = dependency('phosphor-dbus-interfaces')
50phosphor_logging = dependency('phosphor-logging')
51sdbusplus = dependency('sdbusplus')
52ssl = dependency('openssl')
53
54subdir('src')
55
56build_tests = get_option('tests')
57build_examples = get_option('examples')
58
59if build_examples
60  subdir('vendor-example')
61endif
62
63if not build_tests.disabled()
64  subdir('test')
65endif
66