blob: 21d113c67ec6f7f75032ac84cea45f3399fa80ef [file] [log] [blame]
William A. Kennington IIId963adb2021-06-15 18:24:00 -07001project(
2 'phosphor-ipmi-blobs',
3 'cpp',
4 version: '0.1',
Patrick Williamsfda41782021-10-06 15:37:48 -05005 meson_version: '>=0.57.0',
William A. Kennington IIId963adb2021-06-15 18:24:00 -07006 default_options: [
Patrick Williamsfda41782021-10-06 15:37:48 -05007 'cpp_std=c++20',
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 Tu88ca5322022-06-14 01:18:53 -070024cpp = meson.get_compiler('cpp')
25
William A. Kennington IIId963adb2021-06-15 18:24:00 -070026phosphor_logging_dep = dependency('phosphor-logging')
Willy Tu88ca5322022-06-14 01:18:53 -070027ipmid_dep = dependency('libipmid')
28channellayer_dep = cpp.find_library('channellayer', required: true)
William A. Kennington IIId963adb2021-06-15 18:24:00 -070029
30blob_manager_pre = declare_dependency(
31 dependencies: [
32 ipmi_blob_dep,
33 dependency('ipmiblob'),
34 phosphor_logging_dep,
35 ])
36
37blob_manager_lib = static_library(
38 'blobmanager',
39 'fs.cpp',
40 'internal/sys.cpp',
41 'ipmi.cpp',
42 'manager.cpp',
43 'process.cpp',
44 'utils.cpp',
45 implicit_include_directories: false,
46 dependencies: blob_manager_pre)
47
48blob_manager_dep = declare_dependency(
49 link_with: blob_manager_lib,
50 dependencies: blob_manager_pre)
51
52conf_data = configuration_data()
53conf_data.set_quoted(
54 'BLOB_LIB_PATH',
55 get_option('prefix') / get_option('libdir') / 'blob-ipmid')
56conf_h = configure_file(
57 output: 'config.h',
58 configuration: conf_data)
59
60shared_module(
61 'blobmanager',
62 conf_h,
63 'main.cpp',
64 implicit_include_directories: false,
65 dependencies: [
66 blob_manager_dep,
Willy Tu88ca5322022-06-14 01:18:53 -070067 ipmid_dep,
68 channellayer_dep,
William A. Kennington IIId963adb2021-06-15 18:24:00 -070069 ],
70 install: true,
71 install_dir: get_option('libdir') / 'ipmid-providers')
72
73if get_option('examples')
74 subdir('example')
75endif
76
77if not get_option('tests').disabled()
78 subdir('test')
79endif