blob: abf2ddf2996285d1362c65aad8eb4068e3906330 [file] [log] [blame]
Lei YUe065f612019-07-30 14:10:52 +08001project('phosphor-psu-code-mgmt', 'cpp',
2 version: '0.1', meson_version: '>=0.49.0',
3 default_options: [
4 'warning_level=3',
5 'werror=true',
Lei YU01539e72019-07-31 10:57:38 +08006 'cpp_std=c++17',
7 'b_lto=true',
Lei YUe065f612019-07-30 14:10:52 +08008 ])
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
Lei YU5e0dcb32019-08-02 18:04:34 +080018# Common configurations for src and test
19cdata = configuration_data()
Lei YUad90ad52019-08-06 11:19:28 +080020cdata.set_quoted('ITEM_IFACE', 'xyz.openbmc_project.Inventory.Item')
Lei YU9edb7332019-09-19 14:46:19 +080021cdata.set_quoted('ASSET_IFACE', 'xyz.openbmc_project.Inventory.Decorator.Asset')
Lei YU5e0dcb32019-08-02 18:04:34 +080022cdata.set_quoted('VERSION_IFACE', 'xyz.openbmc_project.Software.Version')
23cdata.set_quoted('FILEPATH_IFACE', 'xyz.openbmc_project.Common.FilePath')
24cdata.set_quoted('BUSNAME_UPDATER', 'xyz.openbmc_project.Software.Psu.Updater')
25cdata.set_quoted('PSU_INVENTORY_IFACE', 'xyz.openbmc_project.Inventory.Item.PowerSupply')
26cdata.set_quoted('ACTIVATION_FWD_ASSOCIATION', 'inventory')
27cdata.set_quoted('ACTIVATION_REV_ASSOCIATION', 'activation')
28cdata.set_quoted('ACTIVE_FWD_ASSOCIATION', 'active')
29cdata.set_quoted('ACTIVE_REV_ASSOCIATION', 'software_version')
30cdata.set_quoted('FUNCTIONAL_FWD_ASSOCIATION', 'functional')
31cdata.set_quoted('FUNCTIONAL_REV_ASSOCIATION', 'software_version')
Lei YUf77189f2019-08-07 14:26:30 +080032cdata.set_quoted('VERSION', 'Version')
33cdata.set_quoted('PRESENT', 'Present')
Lei YU9edb7332019-09-19 14:46:19 +080034cdata.set_quoted('MANUFACTURER', 'Manufacturer')
35cdata.set_quoted('MODEL', 'Model')
Lei YU5e0dcb32019-08-02 18:04:34 +080036
37cdata.set_quoted('SOFTWARE_OBJPATH', get_option('SOFTWARE_OBJPATH'))
38cdata.set_quoted('MANIFEST_FILE', get_option('MANIFEST_FILE'))
39cdata.set_quoted('PSU_INVENTORY_PATH_BASE', get_option('PSU_INVENTORY_PATH_BASE'))
Lei YU5f3584d2019-08-27 16:28:53 +080040cdata.set_quoted('PSU_VERSION_UTIL', get_option('PSU_VERSION_UTIL'))
Lei YU12c9f4c2019-09-11 15:08:15 +080041cdata.set_quoted('PSU_UPDATE_SERVICE', get_option('PSU_UPDATE_SERVICE'))
42cdata.set_quoted('IMG_DIR', get_option('IMG_DIR'))
Lei YU2e0e2de2019-09-26 16:42:23 +080043cdata.set_quoted('IMG_DIR_PERSIST', get_option('IMG_DIR_PERSIST'))
44cdata.set_quoted('IMG_DIR_BUILTIN', get_option('IMG_DIR_BUILTIN'))
Lei YU5e0dcb32019-08-02 18:04:34 +080045
46phosphor_dbus_interfaces = dependency('phosphor-dbus-interfaces')
47phosphor_logging = dependency('phosphor-logging')
48sdbusplus = dependency('sdbusplus')
Lei YUad90ad52019-08-06 11:19:28 +080049ssl = dependency('openssl')
Lei YU5e0dcb32019-08-02 18:04:34 +080050
51add_project_link_arguments(['-lstdc++fs'], language: 'cpp')
52
Lei YUe065f612019-07-30 14:10:52 +080053subdir('src')
Lei YU5e0dcb32019-08-02 18:04:34 +080054
55build_tests = get_option('tests')
Lei YU5f3584d2019-08-27 16:28:53 +080056build_examples = get_option('examples')
57
58if build_examples
59 subdir('vendor-example')
60endif
Lei YU5e0dcb32019-08-02 18:04:34 +080061
62if not build_tests.disabled()
63 subdir('test')
64endif