Dung Cao | faf6a6a | 2020-12-28 04:44:45 +0000 | [diff] [blame] | 1 | project('ssifbridge', 'cpp', |
Patrick Williams | 6f25d7b | 2023-04-12 08:05:49 -0500 | [diff] [blame] | 2 | meson_version: '>=0.58.0', |
Dung Cao | faf6a6a | 2020-12-28 04:44:45 +0000 | [diff] [blame] | 3 | default_options: [ |
| 4 | 'buildtype=debugoptimized', |
| 5 | 'warning_level=3', |
| 6 | 'werror=true', |
Dung Cao | b62da09 | 2021-09-16 09:57:17 +0000 | [diff] [blame] | 7 | 'cpp_std=c++20', |
Dung Cao | faf6a6a | 2020-12-28 04:44:45 +0000 | [diff] [blame] | 8 | ], |
| 9 | version: '1.0', |
Thang Q. Nguyen | 20c6f95 | 2020-12-09 03:28:44 +0000 | [diff] [blame] | 10 | ) |
| 11 | |
Dung Cao | faf6a6a | 2020-12-28 04:44:45 +0000 | [diff] [blame] | 12 | add_project_arguments('-Wno-psabi', language: 'cpp') |
Thang Q. Nguyen | 20c6f95 | 2020-12-09 03:28:44 +0000 | [diff] [blame] | 13 | |
| 14 | deps = [dependency('libsystemd', version : '>=221'), |
| 15 | dependency('systemd'), |
Dung Cao | faf6a6a | 2020-12-28 04:44:45 +0000 | [diff] [blame] | 16 | dependency('phosphor-logging'), |
| 17 | dependency('sdbusplus'), |
| 18 | dependency('threads') |
Thang Q. Nguyen | 20c6f95 | 2020-12-09 03:28:44 +0000 | [diff] [blame] | 19 | |
Dung Cao | faf6a6a | 2020-12-28 04:44:45 +0000 | [diff] [blame] | 20 | ] |
| 21 | |
Dung Cao | f624941 | 2021-01-14 03:41:56 +0000 | [diff] [blame] | 22 | # Configure and install systemd unit files |
| 23 | systemd = dependency('systemd') |
Patrick Williams | 6f25d7b | 2023-04-12 08:05:49 -0500 | [diff] [blame] | 24 | systemd_system_unit_dir = systemd.get_variable( |
Dung Cao | f624941 | 2021-01-14 03:41:56 +0000 | [diff] [blame] | 25 | 'systemdsystemunitdir', |
Patrick Williams | 6f25d7b | 2023-04-12 08:05:49 -0500 | [diff] [blame] | 26 | pkgconfig_define: ['prefix', get_option('prefix')]) |
Dung Cao | f624941 | 2021-01-14 03:41:56 +0000 | [diff] [blame] | 27 | |
| 28 | configure_file( |
| 29 | copy: true, |
| 30 | input: 'ssifbridge.service', |
| 31 | install: true, |
| 32 | install_dir: systemd_system_unit_dir, |
| 33 | output: 'ssifbridge.service' |
| 34 | ) |
| 35 | |
Dung Cao | faf6a6a | 2020-12-28 04:44:45 +0000 | [diff] [blame] | 36 | executable('ssifbridged','ssifbridged.cpp', |
Thang Q. Nguyen | 20c6f95 | 2020-12-09 03:28:44 +0000 | [diff] [blame] | 37 | dependencies: deps, |
| 38 | install: true) |