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, |
Patrick Williams | 90b4009 | 2022-03-21 11:50:22 -0500 | [diff] [blame] | 11 | dependency('phosphor-dbus-interfaces'), |
| 12 | dependency('phosphor-logging'), |
William A. Kennington III | abae97a | 2022-11-21 18:26:54 -0800 | [diff] [blame] | 13 | dependency('sdbusplus'), |
| 14 | dependency('sdeventplus'), |
| 15 | dependency('stdplus'), |
William A. Kennington III | 4250639 | 2021-04-22 15:19:54 -0700 | [diff] [blame] | 16 | ] |
| 17 | |
| 18 | watchdog_lib = static_library( |
| 19 | 'watchdog', |
| 20 | 'watchdog.cpp', |
| 21 | implicit_include_directories: false, |
| 22 | include_directories: watchdog_headers, |
| 23 | dependencies: watchdog_deps) |
| 24 | |
| 25 | watchdog_dep = declare_dependency( |
| 26 | dependencies: watchdog_deps, |
| 27 | include_directories: watchdog_headers, |
| 28 | link_with: watchdog_lib) |
| 29 | |
| 30 | executable( |
| 31 | 'phosphor-watchdog', |
| 32 | 'mainapp.cpp', |
| 33 | implicit_include_directories: false, |
| 34 | dependencies: watchdog_dep, |
| 35 | install: true, |
| 36 | install_dir: get_option('bindir')) |