William A. Kennington III | 4250639 | 2021-04-22 15:19:54 -0700 | [diff] [blame] | 1 | watchdog_headers = include_directories('.') |
| 2 | |
Patrick Williams | 90b4009 | 2022-03-21 11:50:22 -0500 | [diff] [blame] | 3 | if cpp.has_header('CLI/CLI.hpp') |
| 4 | CLI11_dep = declare_dependency() |
| 5 | else |
| 6 | CLI11_dep = dependency('CLI11') |
William A. Kennington III | 4250639 | 2021-04-22 15:19:54 -0700 | [diff] [blame] | 7 | endif |
| 8 | |
| 9 | watchdog_deps = [ |
Patrick Williams | 90b4009 | 2022-03-21 11:50:22 -0500 | [diff] [blame] | 10 | CLI11_dep, |
| 11 | dependency('sdbusplus'), |
| 12 | dependency('sdeventplus'), |
| 13 | dependency('phosphor-dbus-interfaces'), |
| 14 | dependency('phosphor-logging'), |
William A. Kennington III | 4250639 | 2021-04-22 15:19:54 -0700 | [diff] [blame] | 15 | ] |
| 16 | |
| 17 | watchdog_lib = static_library( |
| 18 | 'watchdog', |
| 19 | 'watchdog.cpp', |
| 20 | implicit_include_directories: false, |
| 21 | include_directories: watchdog_headers, |
| 22 | dependencies: watchdog_deps) |
| 23 | |
| 24 | watchdog_dep = declare_dependency( |
| 25 | dependencies: watchdog_deps, |
| 26 | include_directories: watchdog_headers, |
| 27 | link_with: watchdog_lib) |
| 28 | |
| 29 | executable( |
| 30 | 'phosphor-watchdog', |
| 31 | 'mainapp.cpp', |
| 32 | implicit_include_directories: false, |
| 33 | dependencies: watchdog_dep, |
| 34 | install: true, |
| 35 | install_dir: get_option('bindir')) |