| boost_dep = dependency('boost', required : false) |
| phosphor_dbus_interfaces_dep = dependency('phosphor-dbus-interfaces') |
| boottime_api_dep = dependency('boottime_api') |
| |
| # absl Dependencies |
| abseils = [ |
| 'base', |
| 'log', |
| 'synchronization', |
| 'status', |
| 'statusor', |
| ] |
| abseil_deps = [] |
| foreach absl : abseils |
| abseil_deps += dependency('absl_' + absl) |
| endforeach |
| |
| fmt_dep = dependency('fmt', required: false) |
| if not fmt_dep.found() |
| fmt_proj = import('cmake').subproject( |
| 'fmt', |
| cmake_options: [ |
| '-DCMAKE_POSITION_INDEPENDENT_CODE=ON', |
| '-DMASTER_PROJECT=OFF' |
| ], |
| required: false) |
| assert(fmt_proj.found(), 'fmtlib is required') |
| fmt_dep = fmt_proj.dependency('fmt') |
| endif |
| |
| boot_time_monitor_pre = [ |
| boost_dep, |
| sdbusplus_dep, |
| fmt_dep, |
| phosphor_dbus_interfaces_dep, |
| config_dependencies, |
| boot_time_monitor_dbus_dep, |
| boottime_api_dep, |
| abseil_deps, |
| ] |
| |
| boot_time_monitor_lib = static_library( |
| 'boot_time_monitor', |
| 'dbus_handler.cpp', |
| 'psm_handler.cpp', |
| 'systemd_handler.cpp', |
| include_directories: boot_time_monitor_incs, |
| implicit_include_directories: false, |
| dependencies: boot_time_monitor_pre, |
| ) |
| |
| boot_time_monitor_dep = declare_dependency( |
| dependencies: boot_time_monitor_pre, |
| include_directories: boot_time_monitor_incs, |
| link_with: boot_time_monitor_lib |
| ) |
| |
| libexecdir = get_option('prefix') / get_option('libexecdir') |
| |
| executable( |
| 'boot-time-monitor', |
| 'main.cpp', |
| implicit_include_directories: false, |
| dependencies: boot_time_monitor_dep, |
| install: true, |
| install_dir: libexecdir |
| ) |