blob: acf5ec16a66c87b1ced01a58033f2a511a20776e [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
37zampoemcmds_pre = declare_dependency(
38 include_directories: root_inc,
39 dependencies: [
40 phosphor_logging_dep,
41 sdbusplus_dep,
42 ipmid_dep,
43 channellayer_dep,
44 userlayer_dep,
45 ])
46
47zampoemcmds_lib = library(
48 'zampoemcmds',
49 'src/appcommands.cpp',
50 'src/bridgingcommands.cpp',
51 'src/oemcommands.cpp',
52 implicit_include_directories: false,
53 dependencies: zampoemcmds_pre,
54 version: meson.project_version(),
55 override_options: ['b_lundef=false'],
56 install: true,
57 install_dir: get_option('libdir') / 'ipmid-providers')