139b370a5SBrad Bishoppsu_monitor = executable(
239b370a5SBrad Bishop    'psu-monitor',
339b370a5SBrad Bishop    'argument.cpp',
439b370a5SBrad Bishop    error_hpp,
539b370a5SBrad Bishop    'main.cpp',
639b370a5SBrad Bishop    'power_supply.cpp',
739b370a5SBrad Bishop    'record_manager.cpp',
839b370a5SBrad Bishop    dependencies: [
9*888bebdeSPatrick Williams        nlohmann_json_dep,
1039b370a5SBrad Bishop        phosphor_dbus_interfaces,
1139b370a5SBrad Bishop        phosphor_logging,
1239b370a5SBrad Bishop        sdbusplus,
13*888bebdeSPatrick Williams        sdeventplus,
1439b370a5SBrad Bishop    ],
1539b370a5SBrad Bishop    include_directories: '..',
1639b370a5SBrad Bishop    install: true,
1739b370a5SBrad Bishop    link_with: [
1839b370a5SBrad Bishop        libpower,
1939b370a5SBrad Bishop    ]
2039b370a5SBrad Bishop)
2139b370a5SBrad Bishop
2239b370a5SBrad Bishoprecord_manager = psu_monitor.extract_objects('record_manager.cpp')
2339b370a5SBrad Bishop
24ff481438SShawn McCarneyif get_option('tests').enabled()
2539b370a5SBrad Bishop    subdir('test')
26ff481438SShawn McCarneyendif
27