blob: 6f55020b79fb30b639147ac8e134e3b20399c0a6 [file] [log] [blame]
Hieu Huynh90a4fb82022-08-02 07:21:03 +00001project(
2 'ampere-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
28root_inc = include_directories('.', 'include')
29
30# Dependencies
31phosphor_logging_dep = dependency('phosphor-logging')
32sdbusplus_dep = dependency('sdbusplus', required : false, include_type: 'system')
33ipmid_dep = dependency('libipmid')
34channellayer_dep = cpp.find_library('channellayer', required: true)
35userlayer_dep = cpp.find_library('userlayer', required: true)
36
Thang Tran2a191522022-11-01 18:09:37 +070037mac_fru_bus = get_option('mac-address-fru-bus')
38if mac_fru_bus >= 0
39 add_project_arguments(
40 '-DMAC_ADDRESS_FRU_BUS=' + mac_fru_bus.to_string(),
41 language : 'cpp')
42endif
43
44mac_fru_bus = get_option('mac-address-fru-addr')
45if mac_fru_bus >= 8 and mac_fru_bus <=119
46 add_project_arguments(
47 '-DMAC_ADDRESS_FRU_ADDR=' + mac_fru_bus.to_string(),
48 language : 'cpp')
49endif
50
Hieu Huynh90a4fb82022-08-02 07:21:03 +000051zampoemcmds_pre = declare_dependency(
52 include_directories: root_inc,
53 dependencies: [
54 phosphor_logging_dep,
55 sdbusplus_dep,
56 ipmid_dep,
57 channellayer_dep,
58 userlayer_dep,
59 ])
60
61zampoemcmds_lib = library(
62 'zampoemcmds',
63 'src/appcommands.cpp',
64 'src/bridgingcommands.cpp',
65 'src/oemcommands.cpp',
66 implicit_include_directories: false,
67 dependencies: zampoemcmds_pre,
68 version: meson.project_version(),
69 override_options: ['b_lundef=false'],
70 install: true,
Thang Tran2a191522022-11-01 18:09:37 +070071 install_dir: get_option('libdir') / 'ipmid-providers')