1watchdog_headers = include_directories('.') 2 3if cpp.has_header('CLI/CLI.hpp') 4 CLI11_dep = declare_dependency() 5else 6 CLI11_dep = dependency('CLI11') 7endif 8 9watchdog_deps = [ 10 CLI11_dep, 11 dependency('phosphor-dbus-interfaces'), 12 dependency('phosphor-logging'), 13 dependency('sdbusplus'), 14 dependency('sdeventplus'), 15 dependency('stdplus'), 16] 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')) 37