Hieu Huynh | 90a4fb8 | 2022-08-02 07:21:03 +0000 | [diff] [blame^] | 1 | project( |
| 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 |
| 13 | cpp = meson.get_compiler('cpp') |
| 14 | add_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 | |
| 28 | root_inc = include_directories('.', 'include') |
| 29 | |
| 30 | # Dependencies |
| 31 | phosphor_logging_dep = dependency('phosphor-logging') |
| 32 | sdbusplus_dep = dependency('sdbusplus', required : false, include_type: 'system') |
| 33 | ipmid_dep = dependency('libipmid') |
| 34 | channellayer_dep = cpp.find_library('channellayer', required: true) |
| 35 | userlayer_dep = cpp.find_library('userlayer', required: true) |
| 36 | |
| 37 | zampoemcmds_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 | |
| 47 | zampoemcmds_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') |