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