blob: a1e05d37050b8bc378e4aa9171ce5631456fc224 [file] [log] [blame]
Lei YUe065f612019-07-30 14:10:52 +08001project('phosphor-psu-code-mgmt', 'cpp',
George Liu6c5f6812023-08-16 10:07:59 +08002 version: '0.1',
3 meson_version: '>=1.1.1',
Lei YUe065f612019-07-30 14:10:52 +08004 default_options: [
5 'warning_level=3',
6 'werror=true',
Patrick Williams81312192023-07-12 11:15:35 -05007 'cpp_std=c++23',
Lei YU01539e72019-07-31 10:57:38 +08008 'b_lto=true',
George Liu6c5f6812023-08-16 10:07:59 +08009 ])
Lei YUe065f612019-07-30 14:10:52 +080010
11systemd = dependency('systemd')
Patrick Williams200adf82023-04-12 08:01:16 -050012servicedir = systemd.get_variable('systemdsystemunitdir')
Lei YU617c0b72020-02-10 16:11:47 +080013subdir('services')
Lei YUe065f612019-07-30 14:10:52 +080014
Lei YU5e0dcb32019-08-02 18:04:34 +080015# Common configurations for src and test
16cdata = configuration_data()
Lei YUad90ad52019-08-06 11:19:28 +080017cdata.set_quoted('ITEM_IFACE', 'xyz.openbmc_project.Inventory.Item')
Lei YU9edb7332019-09-19 14:46:19 +080018cdata.set_quoted('ASSET_IFACE', 'xyz.openbmc_project.Inventory.Decorator.Asset')
Lei YU5e0dcb32019-08-02 18:04:34 +080019cdata.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')
Lei YUa8b966f2020-03-18 10:32:24 +080029cdata.set_quoted('UPDATEABLE_FWD_ASSOCIATION', 'updateable')
30cdata.set_quoted('UPDATEABLE_REV_ASSOCIATION', 'software_version')
Lei YUf77189f2019-08-07 14:26:30 +080031cdata.set_quoted('VERSION', 'Version')
32cdata.set_quoted('PRESENT', 'Present')
Lei YU9edb7332019-09-19 14:46:19 +080033cdata.set_quoted('MANUFACTURER', 'Manufacturer')
34cdata.set_quoted('MODEL', 'Model')
Lei YU5e0dcb32019-08-02 18:04:34 +080035
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'))
Lei YU5f3584d2019-08-27 16:28:53 +080039cdata.set_quoted('PSU_VERSION_UTIL', get_option('PSU_VERSION_UTIL'))
Lei YU65207482019-10-11 16:39:36 +080040cdata.set_quoted('PSU_VERSION_COMPARE_UTIL', get_option('PSU_VERSION_COMPARE_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
Lei YUe065f612019-07-30 14:10:52 +080051subdir('src')
Lei YU5e0dcb32019-08-02 18:04:34 +080052
53build_tests = get_option('tests')
Lei YU5f3584d2019-08-27 16:28:53 +080054build_examples = get_option('examples')
55
56if build_examples
57 subdir('vendor-example')
58endif
Lei YU5e0dcb32019-08-02 18:04:34 +080059
60if not build_tests.disabled()
61 subdir('test')
62endif