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