xref: /openbmc/phosphor-watchdog/meson.build (revision a8f5911b)
1project(
2  'phosphor-watchdog',
3  'cpp',
4  version: '0.1',
5  meson_version: '>=0.55.0',
6  default_options: [
7    'warning_level=3',
8    'cpp_std=c++17',
9  ])
10
11watchdog_headers = include_directories('.')
12
13watchdog_deps = [
14  dependency('phosphor-dbus-interfaces'),
15  dependency('phosphor-logging'),
16  dependency('sdbusplus', fallback: ['sdbusplus', 'sdbusplus_dep']),
17  dependency('sdeventplus', fallback: ['sdeventplus', 'sdeventplus_dep']),
18]
19
20watchdog_lib = static_library(
21  'watchdog',
22  'watchdog.cpp',
23  implicit_include_directories: false,
24  include_directories: watchdog_headers,
25  dependencies: watchdog_deps)
26
27watchdog_dep = declare_dependency(
28  dependencies: watchdog_deps,
29  include_directories: watchdog_headers,
30  link_with: watchdog_lib)
31
32executable(
33  'phosphor-watchdog',
34  'mainapp.cpp',
35  implicit_include_directories: false,
36  dependencies: watchdog_dep,
37  install: true,
38  install_dir: get_option('bindir'))
39
40if not get_option('tests').disabled()
41  subdir('test')
42endif
43