blob: 7f7af2961c2d801b962dfd2031288cda4615d29b [file] [log] [blame]
Willy Tue39f9392022-06-15 13:24:20 -07001project(
2 'fb-ipmi-oem',
3 'cpp',
4 version: '0.1',
5 meson_version: '>=0.57.0',
6 default_options: [
7 'werror=true',
8 'warning_level=3',
9 'cpp_std=c++20',
10 ])
11
12# Project Arguments
13cpp = meson.get_compiler('cpp')
14add_project_arguments(
15 cpp.get_supported_arguments([
16 '-DBOOST_ERROR_CODE_HEADER_ONLY',
17 '-DBOOST_SYSTEM_NO_DEPRECATED',
18 '-DBOOST_ALL_NO_LIB',
19 '-DBOOST_NO_RTTI',
20 '-DBOOST_NO_TYPEID',
21 '-DBOOST_ASIO_DISABLE_THREADS',
22 '-DBOOST_COROUTINES_NO_DEPRECATION_WARNING',
23 '-Wno-psabi',
24 '-Wno-pedantic',
25 ]),
26 language : 'cpp')
27
28host_instances = '0'
29if get_option('host-instances') != ''
30 host_instances = get_option('host-instances')
31endif
32
33add_project_arguments(
34 cpp.get_supported_arguments([
35 '-DINSTANCES=' + host_instances,
36 ]),
37 language : 'cpp')
38
39if not get_option('bic').disabled()
40 add_project_arguments(
41 cpp.get_supported_arguments([
42 '-DBIC_ENABLED',
43 ]),
44 language : 'cpp')
45endif
46
47root_inc = include_directories('.', 'include')
48
49# Dependencies
50phosphor_logging_dep = dependency('phosphor-logging')
51sdbusplus_dep = dependency('sdbusplus', required : false, include_type: 'system')
52ipmid_dep = dependency('libipmid')
53channellayer_dep = cpp.find_library('channellayer', required: true)
54userlayer_dep = cpp.find_library('userlayer', required: true)
55
56zfboemcmds_pre = declare_dependency(
57 include_directories: root_inc,
58 dependencies: [
59 phosphor_logging_dep,
60 sdbusplus_dep,
61 ipmid_dep,
62 channellayer_dep,
63 userlayer_dep,
64 ])
65
Patrick Williams17bd2ea2022-06-24 16:44:51 -050066zfboemcmds_lib = library(
Willy Tue39f9392022-06-15 13:24:20 -070067 'zfboemcmds',
68 'src/oemcommands.cpp',
69 'src/appcommands.cpp',
70 'src/storagecommands.cpp',
71 'src/usb-dbg.cpp',
72 'src/selcommands.cpp',
73 'src/transportcommands.cpp',
74 'src/biccommands.cpp',
75 implicit_include_directories: false,
76 dependencies: zfboemcmds_pre,
Patrick Williams17bd2ea2022-06-24 16:44:51 -050077 version: meson.project_version(),
78 override_options: ['b_lundef=false'],
Willy Tue39f9392022-06-15 13:24:20 -070079 install: true,
80 install_dir: get_option('libdir') / 'ipmid-providers')
Karthikeyan Pasupathi3048dd52022-06-30 21:51:11 +053081
82if get_option('machine') != ''
83 configfile = [
84 'cri_sensors.json',
85 'gpio_desc.json',
86 'post_desc.json'
87 ]
88 foreach c : configfile
89 file = join_paths(get_option('machine'), c)
90 install_data(
91 sources : file,
92 install_dir : get_option('datadir') / 'lcd-debug' )
93 endforeach
94endif