John Wedig | dd9478d | 2023-12-08 14:44:53 -0800 | [diff] [blame] | 1 | project( |
| 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 Wedig | 376d781 | 2024-11-11 16:45:53 -0800 | [diff] [blame] | 13 | absls = [ |
| 14 | 'flags', |
| 15 | 'flags_internal', |
| 16 | 'flags_parse', |
| 17 | ] |
| 18 | libabsl_deps = [] |
| 19 | foreach absl : absls |
| 20 | libabsl_deps += dependency('absl_' + absl) |
| 21 | endforeach |
| 22 | |
John Wedig | dd9478d | 2023-12-08 14:44:53 -0800 | [diff] [blame] | 23 | executable( |
| 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 Wedig | 376d781 | 2024-11-11 16:45:53 -0800 | [diff] [blame] | 31 | libabsl_deps, |
John Wedig | dd9478d | 2023-12-08 14:44:53 -0800 | [diff] [blame] | 32 | ], |
| 33 | install: true, |
| 34 | install_dir: get_option('libexecdir'), |
| 35 | ) |
| 36 | |
| 37 | systemd = dependency('systemd') |
| 38 | systemunitdir = systemd.get_variable('systemdsystemunitdir') |
| 39 | |
| 40 | libexecdir = get_option('prefix') / get_option('libexecdir') |
| 41 | |
| 42 | configure_file( |
| 43 | configuration: {'BIN': libexecdir / 'host_gpio_monitor'}, |
John Wedig | 376d781 | 2024-11-11 16:45:53 -0800 | [diff] [blame] | 44 | input: 'host-gpio-monitor@.service.in', |
| 45 | output: 'host-gpio-monitor@.service', |
John Wedig | dd9478d | 2023-12-08 14:44:53 -0800 | [diff] [blame] | 46 | install_mode: 'rw-r--r--', |
| 47 | install_dir: systemunitdir) |