blob: 2a113d58ca3d624339217c98a6899f6b4fe2af05 [file] [log] [blame]
Patrick Williams516e22f2025-02-01 08:37:12 -05001install_subdir(
2 'configurations',
3 strip_directory: true,
4 install_dir: get_option('datadir') / 'phosphor-psu-monitor',
5)
Brandon Wyman2ad76bd2019-08-26 17:15:04 -05006
Brandon Wyman3f1242f2020-01-28 13:11:25 -06007phosphor_psu_monitor = executable(
Brandon Wyman2ad76bd2019-08-26 17:15:04 -05008 'phosphor-psu-monitor',
9 'main.cpp',
Brandon Wymana0f33ce2019-10-17 18:32:29 -050010 'psu_manager.cpp',
Brandon Wymanaed1f752019-11-25 18:10:52 -060011 'power_supply.cpp',
Brandon Wyman3f1242f2020-01-28 13:11:25 -060012 'util.cpp',
Brandon Wyman57939e82019-08-26 17:53:57 -050013 dependencies: [
Patrick Williams888bebd2023-05-31 19:19:49 -050014 cli11_dep,
B. J. Wyman681b2a32021-04-20 22:31:22 +000015 libgpiodcxx,
Patrick Williams888bebd2023-05-31 19:19:49 -050016 nlohmann_json_dep,
Adriana Kobylakc9b05732022-03-19 15:15:10 +000017 phosphor_dbus_interfaces,
Patrick Williams888bebd2023-05-31 19:19:49 -050018 phosphor_logging,
19 sdbusplus,
20 sdeventplus,
Brandon Wyman57939e82019-08-26 17:53:57 -050021 ],
Brandon Wymana0f33ce2019-10-17 18:32:29 -050022 include_directories: '..',
23 install: true,
Patrick Williams516e22f2025-02-01 08:37:12 -050024 link_with: [libpower],
Brandon Wymana0f33ce2019-10-17 18:32:29 -050025)
Brandon Wyman3f1242f2020-01-28 13:11:25 -060026
27power_supply = phosphor_psu_monitor.extract_objects('power_supply.cpp')
28
Patrick Williams5c6a6932023-11-29 06:44:29 -060029if get_option('tests').allowed()
Patrick Williams516e22f2025-02-01 08:37:12 -050030 subdir('test')
Brandon Wyman3f1242f2020-01-28 13:11:25 -060031endif