William A. Kennington III | b933771 | 2019-01-15 18:27:13 -0800 | [diff] [blame] | 1 | project('phosphor-watchdog', 'cpp', |
| 2 | version: '0.1', meson_version: '>=0.49.0', |
| 3 | default_options: [ |
| 4 | 'warning_level=3', |
| 5 | 'werror=true', |
| 6 | 'cpp_std=c++17' |
| 7 | ]) |
| 8 | |
| 9 | build_tests = get_option('tests') |
| 10 | |
| 11 | phosphor_dbus_interfaces = dependency('phosphor-dbus-interfaces') |
| 12 | phosphor_logging = dependency('phosphor-logging') |
| 13 | sdbusplus = dependency('sdbusplus') |
| 14 | sdeventplus = dependency('sdeventplus') |
| 15 | |
| 16 | libwatchdog = static_library( |
| 17 | 'watchdog', |
| 18 | 'watchdog.cpp', |
| 19 | implicit_include_directories: false, |
| 20 | dependencies: [ |
| 21 | phosphor_dbus_interfaces, |
| 22 | phosphor_logging, |
| 23 | sdbusplus, |
| 24 | sdeventplus, |
| 25 | ]) |
| 26 | |
| 27 | executable( |
| 28 | 'phosphor-watchdog', |
| 29 | 'mainapp.cpp', |
| 30 | implicit_include_directories: false, |
| 31 | link_with: libwatchdog, |
| 32 | dependencies: [ |
| 33 | phosphor_logging, |
| 34 | phosphor_dbus_interfaces, |
| 35 | sdbusplus, |
| 36 | sdeventplus, |
| 37 | ], |
| 38 | install: true, |
| 39 | install_dir: get_option('sbindir')) |
| 40 | |
| 41 | if not build_tests.disabled() |
| 42 | subdir('test') |
| 43 | endif |