blob: cac384bcbd87ca694ef9f3df79e360f64c908164 [file] [log] [blame]
Patrick Williams2d4a0b12023-07-21 07:05:43 -05001project(
2 'phosphor-ipmi-ethstats',
3 'cpp',
4 version: '1.0',
5 default_options: [
Patrick Williams2d4a0b12023-07-21 07:05:43 -05006 'cpp_std=c++23',
7 'warning_level=3',
8 'werror=true',
9 ],
William A. Kennington III48d6b062023-07-26 14:38:56 -070010 meson_version: '>=1.1.1')
Patrick Williams2d4a0b12023-07-21 07:05:43 -050011
William A. Kennington III48d6b062023-07-26 14:38:56 -070012ethstats_pre = declare_dependency(
13 include_directories: include_directories('.'),
14 dependencies: dependency('libipmid'))
Patrick Williams2d4a0b12023-07-21 07:05:43 -050015
William A. Kennington III48d6b062023-07-26 14:38:56 -070016ethstats_lib = static_library(
Patrick Williams2d4a0b12023-07-21 07:05:43 -050017 'ethstatscmd_common',
18 'ethstats.cpp',
19 'handler.cpp',
William A. Kennington III48d6b062023-07-26 14:38:56 -070020 implicit_include_directories: false,
21 dependencies: ethstats_pre)
Patrick Williams2d4a0b12023-07-21 07:05:43 -050022
William A. Kennington III48d6b062023-07-26 14:38:56 -070023ethstats_dep = declare_dependency(
24 dependencies: ethstats_pre,
25 link_with: ethstats_lib)
Patrick Williams2d4a0b12023-07-21 07:05:43 -050026
William A. Kennington III48d6b062023-07-26 14:38:56 -070027conf_data = configuration_data()
28conf_data.set10('ENABLE_GOOGLE', get_option('google_oen'))
29
30shared_library(
Patrick Williams2d4a0b12023-07-21 07:05:43 -050031 'ethstatscmd',
William A. Kennington III48d6b062023-07-26 14:38:56 -070032 configure_file(output: 'config.h', configuration: conf_data),
Patrick Williams2d4a0b12023-07-21 07:05:43 -050033 'main.cpp',
William A. Kennington III48d6b062023-07-26 14:38:56 -070034 implicit_include_directories: false,
35 dependencies: ethstats_dep,
36 override_options: 'b_lundef=false',
Patrick Williams2d4a0b12023-07-21 07:05:43 -050037 version: meson.project_version(),
38 install: true,
William A. Kennington III48d6b062023-07-26 14:38:56 -070039 install_dir: get_option('libdir') / 'ipmid-providers')
Patrick Williamseb887012023-07-21 10:00:49 -050040
41if get_option('tests').allowed()
42 subdir('test')
43endif