blob: 95b1a5ac0b52c5eeaf7a5c8e87f4408cd3aa09ba [file] [log] [blame]
Lei YUe065f612019-07-30 14:10:52 +08001phosphor_dbus_interfaces = dependency('phosphor-dbus-interfaces')
2phosphor_logging = dependency('phosphor-logging')
3sdbusplus = dependency('sdbusplus')
4
Lei YU01539e72019-07-31 10:57:38 +08005add_project_link_arguments(['-lstdc++fs'], language: 'cpp')
6
7cdata = configuration_data()
Lei YU01539e72019-07-31 10:57:38 +08008cdata.set_quoted('VERSION_IFACE', 'xyz.openbmc_project.Software.Version')
9cdata.set_quoted('FILEPATH_IFACE', 'xyz.openbmc_project.Common.FilePath')
10cdata.set_quoted('BUSNAME_UPDATER', 'xyz.openbmc_project.Software.Psu.Updater')
Lei YU91029442019-08-01 15:57:31 +080011cdata.set_quoted('ACTIVATION_FWD_ASSOCIATION', 'inventory')
12cdata.set_quoted('ACTIVATION_REV_ASSOCIATION', 'activation')
Lei YU91029442019-08-01 15:57:31 +080013cdata.set_quoted('ACTIVE_FWD_ASSOCIATION', 'active')
14cdata.set_quoted('ACTIVE_REV_ASSOCIATION', 'software_version')
15cdata.set_quoted('FUNCTIONAL_FWD_ASSOCIATION', 'functional')
16cdata.set_quoted('FUNCTIONAL_REV_ASSOCIATION', 'software_version')
Lei YU01539e72019-07-31 10:57:38 +080017
Lei YUc4cfc6e2019-08-02 11:30:10 +080018cdata.set_quoted('SOFTWARE_OBJPATH', get_option('SOFTWARE_OBJPATH'))
19cdata.set_quoted('MANIFEST_FILE', get_option('MANIFEST_FILE'))
20cdata.set_quoted('PSU_INVENTORY_PATH', get_option('PSU_INVENTORY_PATH'))
21
Lei YU01539e72019-07-31 10:57:38 +080022configure_file(output: 'config.h',
23 configuration: cdata,
24)
25configuration_inc = include_directories('.')
26
Lei YUe065f612019-07-30 14:10:52 +080027executable(
28 'phosphor-psu-code-manager',
29 'activation.cpp',
Lei YU01539e72019-07-31 10:57:38 +080030 'item_updater.cpp',
Lei YUe065f612019-07-30 14:10:52 +080031 'main.cpp',
Lei YU01539e72019-07-31 10:57:38 +080032 'version.cpp',
33 include_directories: configuration_inc,
Lei YUe065f612019-07-30 14:10:52 +080034 dependencies: [
35 phosphor_logging,
36 phosphor_dbus_interfaces,
37 sdbusplus,
38 ],
39 install: true,
40 install_dir: get_option('bindir'))