blob: e25a727447b099b414ca9252d3a347ed03724fa5 [file] [log] [blame]
William A. Kennington III0b3c3892021-04-20 16:00:55 -07001project(
2 'phosphor-watchdog',
3 'cpp',
4 version: '0.1',
William A. Kennington IIIa8f59112021-04-20 16:21:25 -07005 meson_version: '>=0.55.0',
William A. Kennington III0b3c3892021-04-20 16:00:55 -07006 default_options: [
7 'warning_level=3',
William A. Kennington III0b3c3892021-04-20 16:00:55 -07008 'cpp_std=c++17',
9 ])
William A. Kennington IIIb9337712019-01-15 18:27:13 -080010
William A. Kennington III080ffd72021-04-20 16:45:24 -070011watchdog_headers = include_directories('.')
William A. Kennington IIIb9337712019-01-15 18:27:13 -080012
William A. Kennington III080ffd72021-04-20 16:45:24 -070013watchdog_deps = [
14 dependency('phosphor-dbus-interfaces'),
15 dependency('phosphor-logging'),
William A. Kennington IIIa8f59112021-04-20 16:21:25 -070016 dependency('sdbusplus', fallback: ['sdbusplus', 'sdbusplus_dep']),
17 dependency('sdeventplus', fallback: ['sdeventplus', 'sdeventplus_dep']),
William A. Kennington III080ffd72021-04-20 16:45:24 -070018]
19
20watchdog_lib = static_library(
William A. Kennington IIIb9337712019-01-15 18:27:13 -080021 'watchdog',
22 'watchdog.cpp',
23 implicit_include_directories: false,
William A. Kennington III080ffd72021-04-20 16:45:24 -070024 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)
William A. Kennington IIIb9337712019-01-15 18:27:13 -080031
32executable(
33 'phosphor-watchdog',
34 'mainapp.cpp',
35 implicit_include_directories: false,
William A. Kennington III080ffd72021-04-20 16:45:24 -070036 dependencies: watchdog_dep,
William A. Kennington IIIb9337712019-01-15 18:27:13 -080037 install: true,
Patrick Venture8c8072a2019-03-28 10:50:21 -070038 install_dir: get_option('bindir'))
William A. Kennington IIIb9337712019-01-15 18:27:13 -080039
William A. Kennington III0b3c3892021-04-20 16:00:55 -070040if not get_option('tests').disabled()
William A. Kennington IIIb9337712019-01-15 18:27:13 -080041 subdir('test')
42endif