blob: bc4f1a16397a4548e8dffae75bd987424ca8d904 [file] [log] [blame]
William A. Kennington IIId963adb2021-06-15 18:24:00 -07001project(
2 'phosphor-ipmi-blobs',
3 'cpp',
4 version: '0.1',
5 meson_version: '>=0.51.0',
6 default_options: [
7 'cpp_std=c++17',
8 '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
24phosphor_logging_dep = dependency('phosphor-logging')
25
26blob_manager_pre = declare_dependency(
27 dependencies: [
28 ipmi_blob_dep,
29 dependency('ipmiblob'),
30 phosphor_logging_dep,
31 ])
32
33blob_manager_lib = static_library(
34 'blobmanager',
35 'fs.cpp',
36 'internal/sys.cpp',
37 'ipmi.cpp',
38 'manager.cpp',
39 'process.cpp',
40 'utils.cpp',
41 implicit_include_directories: false,
42 dependencies: blob_manager_pre)
43
44blob_manager_dep = declare_dependency(
45 link_with: blob_manager_lib,
46 dependencies: blob_manager_pre)
47
48conf_data = configuration_data()
49conf_data.set_quoted(
50 'BLOB_LIB_PATH',
51 get_option('prefix') / get_option('libdir') / 'blob-ipmid')
52conf_h = configure_file(
53 output: 'config.h',
54 configuration: conf_data)
55
56shared_module(
57 'blobmanager',
58 conf_h,
59 'main.cpp',
60 implicit_include_directories: false,
61 dependencies: [
62 blob_manager_dep,
63 dependency('libipmid'),
64 ],
65 install: true,
66 install_dir: get_option('libdir') / 'ipmid-providers')
67
68if get_option('examples')
69 subdir('example')
70endif
71
72if not get_option('tests').disabled()
73 subdir('test')
74endif