William A. Kennington III | d963adb | 2021-06-15 18:24:00 -0700 | [diff] [blame] | 1 | project( |
| 2 | 'phosphor-ipmi-blobs', |
| 3 | 'cpp', |
| 4 | version: '0.1', |
| 5 | meson_version: '>=0.51.0', |
| 6 | default_options: [ |
| 7 | 'cpp_std=c++17', |
| 8 | 'warning_level=3', |
| 9 | 'werror=true', |
| 10 | ]) |
| 11 | |
| 12 | ipmi_blob_dep = declare_dependency( |
| 13 | include_directories: include_directories('.')) |
| 14 | |
William A. Kennington III | d5ed409 | 2021-06-16 12:31:07 -0700 | [diff] [blame^] | 15 | install_headers( |
| 16 | 'blobs-ipmid/blobs.hpp', |
| 17 | subdir: 'blobs-ipmid') |
| 18 | |
William A. Kennington III | d963adb | 2021-06-15 18:24:00 -0700 | [diff] [blame] | 19 | import('pkgconfig').generate( |
| 20 | name: 'phosphor-ipmi-blobs', |
| 21 | description: 'Phosphor Blob Transfer Interface', |
| 22 | version: meson.project_version()) |
| 23 | |
| 24 | phosphor_logging_dep = dependency('phosphor-logging') |
| 25 | |
| 26 | blob_manager_pre = declare_dependency( |
| 27 | dependencies: [ |
| 28 | ipmi_blob_dep, |
| 29 | dependency('ipmiblob'), |
| 30 | phosphor_logging_dep, |
| 31 | ]) |
| 32 | |
| 33 | blob_manager_lib = static_library( |
| 34 | 'blobmanager', |
| 35 | 'fs.cpp', |
| 36 | 'internal/sys.cpp', |
| 37 | 'ipmi.cpp', |
| 38 | 'manager.cpp', |
| 39 | 'process.cpp', |
| 40 | 'utils.cpp', |
| 41 | implicit_include_directories: false, |
| 42 | dependencies: blob_manager_pre) |
| 43 | |
| 44 | blob_manager_dep = declare_dependency( |
| 45 | link_with: blob_manager_lib, |
| 46 | dependencies: blob_manager_pre) |
| 47 | |
| 48 | conf_data = configuration_data() |
| 49 | conf_data.set_quoted( |
| 50 | 'BLOB_LIB_PATH', |
| 51 | get_option('prefix') / get_option('libdir') / 'blob-ipmid') |
| 52 | conf_h = configure_file( |
| 53 | output: 'config.h', |
| 54 | configuration: conf_data) |
| 55 | |
| 56 | shared_module( |
| 57 | 'blobmanager', |
| 58 | conf_h, |
| 59 | 'main.cpp', |
| 60 | implicit_include_directories: false, |
| 61 | dependencies: [ |
| 62 | blob_manager_dep, |
| 63 | dependency('libipmid'), |
| 64 | ], |
| 65 | install: true, |
| 66 | install_dir: get_option('libdir') / 'ipmid-providers') |
| 67 | |
| 68 | if get_option('examples') |
| 69 | subdir('example') |
| 70 | endif |
| 71 | |
| 72 | if not get_option('tests').disabled() |
| 73 | subdir('test') |
| 74 | endif |