blob: ccef9caf36a3b4988e6e86078af7bbda54e70521 [file] [log] [blame]
William A. Kennington III42506392021-04-22 15:19:54 -07001watchdog_headers = include_directories('.')
2
Patrick Williams90b40092022-03-21 11:50:22 -05003if cpp.has_header('CLI/CLI.hpp')
4 CLI11_dep = declare_dependency()
5else
6 CLI11_dep = dependency('CLI11')
William A. Kennington III42506392021-04-22 15:19:54 -07007endif
8
9watchdog_deps = [
Patrick Williams90b40092022-03-21 11:50:22 -050010 CLI11_dep,
Patrick Williams90b40092022-03-21 11:50:22 -050011 dependency('phosphor-dbus-interfaces'),
12 dependency('phosphor-logging'),
William A. Kennington IIIabae97a2022-11-21 18:26:54 -080013 dependency('sdbusplus'),
14 dependency('sdeventplus'),
15 dependency('stdplus'),
William A. Kennington III42506392021-04-22 15:19:54 -070016]
17
18watchdog_lib = static_library(
19 'watchdog',
20 'watchdog.cpp',
21 implicit_include_directories: false,
22 include_directories: watchdog_headers,
23 dependencies: watchdog_deps)
24
25watchdog_dep = declare_dependency(
26 dependencies: watchdog_deps,
27 include_directories: watchdog_headers,
28 link_with: watchdog_lib)
29
30executable(
31 'phosphor-watchdog',
32 'mainapp.cpp',
33 implicit_include_directories: false,
34 dependencies: watchdog_dep,
35 install: true,
36 install_dir: get_option('bindir'))