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: [ |
| 6 | 'buildtype=debugoptimized', |
| 7 | 'cpp_std=c++23', |
| 8 | 'warning_level=3', |
| 9 | 'werror=true', |
| 10 | ], |
| 11 | meson_version: '>=1.1.1', |
| 12 | ) |
| 13 | |
| 14 | conf_data = configuration_data() |
| 15 | conf_data.set('ENABLE_GOOGLE', get_option('google_oen').allowed().to_int()) |
| 16 | configure_file( |
| 17 | output: 'config.h', |
| 18 | configuration: conf_data, |
| 19 | ) |
| 20 | |
| 21 | ipmid_dep = dependency('libipmid') |
| 22 | |
| 23 | ethstatscmd_common_lib = static_library( |
| 24 | 'ethstatscmd_common', |
| 25 | 'ethstats.cpp', |
| 26 | 'handler.cpp', |
| 27 | dependencies: [ |
| 28 | ipmid_dep, |
| 29 | ], |
| 30 | ) |
| 31 | |
| 32 | ethstatscmd_common_dep = declare_dependency( |
| 33 | link_with: ethstatscmd_common_lib, |
| 34 | ) |
| 35 | |
| 36 | ethstatscmd_lib = library( |
| 37 | 'ethstatscmd', |
| 38 | 'main.cpp', |
| 39 | dependencies: [ |
| 40 | ethstatscmd_common_dep, |
| 41 | ipmid_dep, |
| 42 | ], |
| 43 | override_options: [ 'b_lundef=false' ], |
| 44 | version: meson.project_version(), |
| 45 | install: true, |
| 46 | install_dir: get_option('libdir') / 'ipmid-providers', |
| 47 | ) |