Willy Tu | 8970726 | 2022-06-15 13:27:37 -0700 | [diff] [blame] | 1 | project( |
| 2 | 'openpower-host-ipmi-flash', |
| 3 | 'cpp', |
| 4 | version: '0.1', |
Patrick Williams | a917d24 | 2023-07-12 11:15:20 -0500 | [diff] [blame] | 5 | meson_version: '>=1.1.1', |
Willy Tu | 8970726 | 2022-06-15 13:27:37 -0700 | [diff] [blame] | 6 | default_options: [ |
| 7 | 'werror=true', |
| 8 | 'warning_level=3', |
Patrick Williams | a917d24 | 2023-07-12 11:15:20 -0500 | [diff] [blame] | 9 | 'cpp_std=c++23', |
Willy Tu | 8970726 | 2022-06-15 13:27:37 -0700 | [diff] [blame] | 10 | 'tests=' + (meson.is_subproject() ? 'disabled' : 'auto'), |
| 11 | ]) |
| 12 | |
| 13 | # Dependencies |
| 14 | phosphor_logging_dep = dependency('phosphor-logging') |
| 15 | systemd = dependency('systemd') |
| 16 | sdbusplus_dep = dependency('sdbusplus', required : false, include_type: 'system') |
| 17 | ipmid_dep = dependency('libipmid') |
| 18 | |
| 19 | # Project Arguments |
| 20 | cpp = meson.get_compiler('cpp') |
| 21 | add_project_arguments( |
| 22 | cpp.get_supported_arguments([ |
| 23 | '-DBOOST_COROUTINES_NO_DEPRECATION_WARNING', |
| 24 | ]), |
| 25 | language : 'cpp') |
| 26 | |
| 27 | root_inc = include_directories('.') |
| 28 | |
| 29 | hiomapdir_pre = declare_dependency( |
| 30 | include_directories: root_inc, |
| 31 | dependencies: [ |
| 32 | phosphor_logging_dep, |
| 33 | systemd, |
| 34 | sdbusplus_dep, |
| 35 | ipmid_dep, |
| 36 | ]) |
| 37 | |
| 38 | library( |
| 39 | 'hiomap', |
| 40 | 'hiomap.cpp', |
| 41 | implicit_include_directories: false, |
| 42 | dependencies: hiomapdir_pre, |
| 43 | version: meson.project_version(), |
| 44 | override_options: ['b_lundef=false'], |
| 45 | install: true, |
| 46 | install_dir: get_option('libdir') / 'ipmid-providers') |