Patrick Williams | 2d4a0b1 | 2023-07-21 07:05:43 -0500 | [diff] [blame] | 1 | project( |
| 2 | 'phosphor-ipmi-ethstats', |
| 3 | 'cpp', |
| 4 | version: '1.0', |
| 5 | default_options: [ |
Patrick Williams | 2d4a0b1 | 2023-07-21 07:05:43 -0500 | [diff] [blame] | 6 | 'cpp_std=c++23', |
| 7 | 'warning_level=3', |
| 8 | 'werror=true', |
| 9 | ], |
William A. Kennington III | 48d6b06 | 2023-07-26 14:38:56 -0700 | [diff] [blame] | 10 | meson_version: '>=1.1.1') |
Patrick Williams | 2d4a0b1 | 2023-07-21 07:05:43 -0500 | [diff] [blame] | 11 | |
William A. Kennington III | 48d6b06 | 2023-07-26 14:38:56 -0700 | [diff] [blame] | 12 | ethstats_pre = declare_dependency( |
| 13 | include_directories: include_directories('.'), |
| 14 | dependencies: dependency('libipmid')) |
Patrick Williams | 2d4a0b1 | 2023-07-21 07:05:43 -0500 | [diff] [blame] | 15 | |
William A. Kennington III | 48d6b06 | 2023-07-26 14:38:56 -0700 | [diff] [blame] | 16 | ethstats_lib = static_library( |
Patrick Williams | 2d4a0b1 | 2023-07-21 07:05:43 -0500 | [diff] [blame] | 17 | 'ethstatscmd_common', |
| 18 | 'ethstats.cpp', |
| 19 | 'handler.cpp', |
William A. Kennington III | 48d6b06 | 2023-07-26 14:38:56 -0700 | [diff] [blame] | 20 | implicit_include_directories: false, |
| 21 | dependencies: ethstats_pre) |
Patrick Williams | 2d4a0b1 | 2023-07-21 07:05:43 -0500 | [diff] [blame] | 22 | |
William A. Kennington III | 48d6b06 | 2023-07-26 14:38:56 -0700 | [diff] [blame] | 23 | ethstats_dep = declare_dependency( |
| 24 | dependencies: ethstats_pre, |
| 25 | link_with: ethstats_lib) |
Patrick Williams | 2d4a0b1 | 2023-07-21 07:05:43 -0500 | [diff] [blame] | 26 | |
William A. Kennington III | 48d6b06 | 2023-07-26 14:38:56 -0700 | [diff] [blame] | 27 | conf_data = configuration_data() |
| 28 | conf_data.set10('ENABLE_GOOGLE', get_option('google_oen')) |
| 29 | |
| 30 | shared_library( |
Patrick Williams | 2d4a0b1 | 2023-07-21 07:05:43 -0500 | [diff] [blame] | 31 | 'ethstatscmd', |
William A. Kennington III | 48d6b06 | 2023-07-26 14:38:56 -0700 | [diff] [blame] | 32 | configure_file(output: 'config.h', configuration: conf_data), |
Patrick Williams | 2d4a0b1 | 2023-07-21 07:05:43 -0500 | [diff] [blame] | 33 | 'main.cpp', |
William A. Kennington III | 48d6b06 | 2023-07-26 14:38:56 -0700 | [diff] [blame] | 34 | implicit_include_directories: false, |
| 35 | dependencies: ethstats_dep, |
| 36 | override_options: 'b_lundef=false', |
Patrick Williams | 2d4a0b1 | 2023-07-21 07:05:43 -0500 | [diff] [blame] | 37 | version: meson.project_version(), |
| 38 | install: true, |
William A. Kennington III | 48d6b06 | 2023-07-26 14:38:56 -0700 | [diff] [blame] | 39 | install_dir: get_option('libdir') / 'ipmid-providers') |
Patrick Williams | eb88701 | 2023-07-21 10:00:49 -0500 | [diff] [blame] | 40 | |
| 41 | if get_option('tests').allowed() |
| 42 | subdir('test') |
| 43 | endif |