blob: 3926bb63d39858e7db1b09bf09985ddd19f50e27 [file] [log] [blame]
boost_dep = dependency('boost', required : false)
phosphor_dbus_interfaces_dep = dependency('phosphor-dbus-interfaces')
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_lib = static_library(
'boot_time_monitor',
'host_monitor_app.cpp',
'utils.cpp',
'boot_manager.cpp',
'dbus_handler.cpp',
'bmc_monitor_app.cpp',
generated_sources,
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
)