1project( 2 'biosconfig-manager', 3 'cpp', 4 meson_version: '>=1.1.1', 5 default_options: [ 6 'warning_level=3', 7 'werror=true', 8 'cpp_std=c++23', 9 'buildtype=debugoptimized' 10 ], 11 license: 'Apache-2.0', 12 version: '1.0', 13) 14 15# Wno-psabi reduces the number of "Note:" messages when cross-compiling some STL 16# stuff for ARM. See https://stackoverflow.com/questions/48149323/strange-gcc-warning-when-compiling-qt-project 17# Basically, gcc 6 and gcc 7 are not ABI compatible, but since the whole OpenBMC 18# project uses the same compiler, we can safely ignmore these info notes. 19add_project_arguments('-Wno-psabi', language: 'cpp') 20 21conf_data = configuration_data() 22conf_data.set_quoted('BIOS_PERSIST_PATH', get_option('bios-persist-path')) 23configure_file(output: 'config.h', configuration: conf_data) 24 25boost_args = ['-DBOOST_ALL_NO_LIB', 26 '-DBOOST_ASIO_DISABLE_THREADS', 27 '-DBOOST_ERROR_CODE_HEADER_ONLY', 28 '-DBOOST_NO_RTTI', 29 '-DBOOST_NO_TYPEID', 30 '-DBOOST_SYSTEM_NO_DEPRECATED'] 31 32deps = [dependency('boost'), 33 dependency('phosphor-dbus-interfaces'), 34 dependency('phosphor-logging'), 35 dependency('sdbusplus'), 36 dependency('systemd'), 37 dependency('openssl'), 38 dependency('nlohmann_json',include_type: 'system') 39] 40 41src_files = ['src/main.cpp', 42 'src/manager.cpp', 43 'src/manager_serialize.cpp', 44 'src/password.cpp' 45] 46 47executable('biosconfig-manager', 48 src_files, 49 implicit_include_directories: true, 50 include_directories: ['include'], 51 dependencies: deps, 52 cpp_args : boost_args, 53 install: true, 54 install_dir: get_option('bindir')) 55 56systemd = dependency('systemd') 57systemd_system_unit_dir = systemd.get_variable( 58 'systemdsystemunitdir', 59 pkgconfig_define: ['prefix', get_option('prefix')]) 60 61fs = import('fs') 62fs.copyfile( 63 'service_files/xyz.openbmc_project.biosconfig_manager.service', 64 install: true, 65 install_dir: systemd_system_unit_dir 66) 67