blob: 4d2e0117ffbbe00a51ad56169a551f1d2055ddc9 [file] [log] [blame]
Jie Yangb988dbb2021-08-06 18:34:49 -07001project(
2 'phosphor-ipmi-blobs-binarystore',
3 'cpp',
4 version: '0.1',
5 meson_version: '>=0.57.0',
6 default_options: [
7 'cpp_std=c++20',
8 'warning_level=3',
9 'werror=true',
10 ]
11)
12
13
14cpp = meson.get_compiler('cpp')
15cpp.has_header('boost/endian/arithmetic.hpp')
16cpp.has_header('nlohmann/json.hpp')
17protobuf_dep = dependency('protobuf')
18ipmi_blob_dep = dependency('phosphor-ipmi-blobs')
19phosphor_logging_dep = dependency('phosphor-logging')
20
21subdir('proto')
22
23binarystoreblob_pre = declare_dependency(
24 include_directories: [
25 include_directories('.'),
26 include_directories('proto')],
27 dependencies: [
28 protobuf_dep,
29 ipmi_blob_dep,
30 phosphor_logging_dep,
31 ])
32
33binarystoreblob_lib = library(
34 'binarystore',
35 'binarystore.cpp',
36 'sys.cpp',
37 'sys_file_impl.cpp',
38 'handler.cpp',
39 proto,
40 implicit_include_directories: false,
41 dependencies: binarystoreblob_pre,
42 install: true,
43 install_dir: get_option('libdir') / 'blob-ipmid')
44
45binarystoreblob_dep = declare_dependency(
46 link_with: binarystoreblob_lib,
47 dependencies: binarystoreblob_pre)
48
49if not get_option('blobtool').disabled()
50 executable(
51 'blobtool',
52 'blobtool.cpp',
53 implicit_include_directories: false,
54 dependencies: binarystoreblob_dep,
55 install: true)
56endif
57
58
59if not get_option('tests').disabled()
60 subdir('test')
61endif