Ed Tanous | 2b314e4 | 2025-08-19 15:46:18 -0700 | [diff] [blame^] | 1 | project( |
| 2 | 'platform-init', |
| 3 | 'cpp', |
| 4 | meson_version: '>=1.7.0', |
| 5 | version: '0.1', |
| 6 | default_options: ['warning_level=3', 'cpp_std=c++23'], |
| 7 | ) |
| 8 | |
| 9 | gpiodcxx_dep = dependency('libgpiodcxx', default_options: ['bindings=cxx']) |
| 10 | systemd_dep = dependency('systemd') |
| 11 | libsystemd_dep = dependency('libsystemd') |
| 12 | |
| 13 | cli11_dep = dependency('CLI11', required: true, include_type: 'system') |
| 14 | |
| 15 | exe = executable( |
| 16 | 'platform', |
| 17 | 'platform.cpp', |
| 18 | dependencies: [gpiodcxx_dep, libsystemd_dep, cli11_dep], |
| 19 | include_directories: ['.'], |
| 20 | install: true, |
| 21 | install_dir: get_option('libexecdir'), |
| 22 | ) |
| 23 | |
| 24 | systemd_system_unit_dir = systemd_dep.get_variable('systemd_system_unit_dir') |
| 25 | configure_file( |
| 26 | input: 'platform_init.service.in', |
| 27 | output: 'platform_init.service', |
| 28 | install_dir: systemd_system_unit_dir, |
| 29 | install: true, |
| 30 | configuration: configuration_data( |
| 31 | {'PLATFORM_NAME': get_option('platform-name')}, |
| 32 | ), |
| 33 | ) |