blob: d2b07e01c1eb8f571377f991b1a9dbce471eef89 [file] [log] [blame]
John Wedigdd9478d2023-12-08 14:44:53 -08001project(
2 'host_gpio_monitor',
3 'cpp',
4 version: '0.1',
5 meson_version: '>=1.1.1',
6 default_options: [
7 'warning_level=3',
8 'werror=true',
9 'cpp_std=c++23',
10 ],
11)
12
John Wedig376d7812024-11-11 16:45:53 -080013absls = [
14 'flags',
15 'flags_internal',
16 'flags_parse',
17]
18libabsl_deps = []
19foreach absl : absls
20 libabsl_deps += dependency('absl_' + absl)
21endforeach
22
John Wedigdd9478d2023-12-08 14:44:53 -080023executable(
24 'host_gpio_monitor',
25 'host_gpio_monitor.cpp',
26 implicit_include_directories: false,
27 dependencies:
28 [
29 dependency('stdplus'),
30 dependency('phosphor-logging'),
John Wedig376d7812024-11-11 16:45:53 -080031 libabsl_deps,
John Wedigdd9478d2023-12-08 14:44:53 -080032 ],
33 install: true,
34 install_dir: get_option('libexecdir'),
35)
36
37systemd = dependency('systemd')
38systemunitdir = systemd.get_variable('systemdsystemunitdir')
39
40libexecdir = get_option('prefix') / get_option('libexecdir')
41
42configure_file(
43 configuration: {'BIN': libexecdir / 'host_gpio_monitor'},
John Wedig376d7812024-11-11 16:45:53 -080044 input: 'host-gpio-monitor@.service.in',
45 output: 'host-gpio-monitor@.service',
John Wedigdd9478d2023-12-08 14:44:53 -080046 install_mode: 'rw-r--r--',
47 install_dir: systemunitdir)