blob: 0dc62094aadb63186fe02bba632cb98d525be714 [file] [log] [blame]
William A. Kennington IIId963adb2021-06-15 18:24:00 -07001project(
2 'phosphor-ipmi-blobs',
3 'cpp',
4 version: '0.1',
Patrick Williams2f457592023-07-12 11:15:59 -05005 meson_version: '>=1.1.1',
William A. Kennington IIId963adb2021-06-15 18:24:00 -07006 default_options: [
Patrick Williams2f457592023-07-12 11:15:59 -05007 'cpp_std=c++23',
William A. Kennington IIId963adb2021-06-15 18:24:00 -07008 'warning_level=3',
9 'werror=true',
10 ])
11
12ipmi_blob_dep = declare_dependency(
13 include_directories: include_directories('.'))
14
William A. Kennington IIId5ed4092021-06-16 12:31:07 -070015install_headers(
16 'blobs-ipmid/blobs.hpp',
17 subdir: 'blobs-ipmid')
18
William A. Kennington IIId963adb2021-06-15 18:24:00 -070019import('pkgconfig').generate(
20 name: 'phosphor-ipmi-blobs',
21 description: 'Phosphor Blob Transfer Interface',
22 version: meson.project_version())
23
Willy Tu83f99922022-06-22 14:59:07 -070024cpp = meson.get_compiler('cpp')
25
William A. Kennington IIId963adb2021-06-15 18:24:00 -070026phosphor_logging_dep = dependency('phosphor-logging')
Willy Tu83f99922022-06-22 14:59:07 -070027ipmid_dep = dependency('libipmid')
Jonathan Domancb80fa52023-07-24 10:22:59 -070028channellayer_dep = dependency('libchannellayer')
William A. Kennington IIId963adb2021-06-15 18:24:00 -070029
30blob_manager_pre = declare_dependency(
31 dependencies: [
32 ipmi_blob_dep,
33 dependency('ipmiblob'),
Jonathan Domancb80fa52023-07-24 10:22:59 -070034 ipmid_dep,
William A. Kennington IIId963adb2021-06-15 18:24:00 -070035 phosphor_logging_dep,
36 ])
37
38blob_manager_lib = static_library(
39 'blobmanager',
40 'fs.cpp',
41 'internal/sys.cpp',
42 'ipmi.cpp',
43 'manager.cpp',
44 'process.cpp',
45 'utils.cpp',
46 implicit_include_directories: false,
47 dependencies: blob_manager_pre)
48
49blob_manager_dep = declare_dependency(
50 link_with: blob_manager_lib,
51 dependencies: blob_manager_pre)
52
53conf_data = configuration_data()
54conf_data.set_quoted(
55 'BLOB_LIB_PATH',
56 get_option('prefix') / get_option('libdir') / 'blob-ipmid')
57conf_h = configure_file(
58 output: 'config.h',
59 configuration: conf_data)
60
61shared_module(
62 'blobmanager',
63 conf_h,
64 'main.cpp',
65 implicit_include_directories: false,
66 dependencies: [
67 blob_manager_dep,
Willy Tu83f99922022-06-22 14:59:07 -070068 ipmid_dep,
69 channellayer_dep,
William A. Kennington IIId963adb2021-06-15 18:24:00 -070070 ],
71 install: true,
72 install_dir: get_option('libdir') / 'ipmid-providers')
73
74if get_option('examples')
75 subdir('example')
76endif
77
78if not get_option('tests').disabled()
79 subdir('test')
80endif