Kuiying Wang | 642f437 | 2020-08-12 15:35:46 +0800 | [diff] [blame] | 1 | project( |
| 2 | 'biosconfig-manager', |
| 3 | 'cpp', |
George Liu | fb92842 | 2021-12-08 10:21:44 +0800 | [diff] [blame^] | 4 | meson_version: '>=0.58.0', |
Kuiying Wang | 642f437 | 2020-08-12 15:35:46 +0800 | [diff] [blame] | 5 | default_options: [ |
| 6 | 'warning_level=3', |
| 7 | 'werror=true', |
George Liu | fb92842 | 2021-12-08 10:21:44 +0800 | [diff] [blame^] | 8 | 'cpp_std=c++20', |
| 9 | 'buildtype=debugoptimized' |
Kuiying Wang | 642f437 | 2020-08-12 15:35:46 +0800 | [diff] [blame] | 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. |
| 19 | add_project_arguments('-Wno-psabi', language: 'cpp') |
| 20 | |
Tom Joseph | f1101df | 2020-11-06 08:23:34 +0530 | [diff] [blame] | 21 | conf_data = configuration_data() |
| 22 | conf_data.set_quoted('BIOS_PERSIST_PATH', get_option('bios-persist-path')) |
| 23 | configure_file(output: 'config.h', configuration: conf_data) |
| 24 | |
Kuiying Wang | 642f437 | 2020-08-12 15:35:46 +0800 | [diff] [blame] | 25 | boost_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 | |
| 32 | deps = [dependency('boost'), |
| 33 | dependency('phosphor-dbus-interfaces'), |
| 34 | dependency('phosphor-logging'), |
| 35 | dependency('sdbusplus'), |
| 36 | dependency('systemd'), |
Kuiying Wang | 8f70621 | 2020-12-16 18:59:24 +0800 | [diff] [blame] | 37 | dependency('openssl'), |
Kuiying Wang | 642f437 | 2020-08-12 15:35:46 +0800 | [diff] [blame] | 38 | ] |
| 39 | |
| 40 | executable('biosconfig-manager', |
| 41 | 'src/manager.cpp', |
Tom Joseph | f1101df | 2020-11-06 08:23:34 +0530 | [diff] [blame] | 42 | 'src/manager_serialize.cpp', |
| 43 | implicit_include_directories: true, |
Kuiying Wang | 642f437 | 2020-08-12 15:35:46 +0800 | [diff] [blame] | 44 | include_directories: ['include'], |
| 45 | dependencies: deps, |
| 46 | cpp_args : boost_args, |
| 47 | install: true, |
| 48 | install_dir: get_option('bindir')) |
| 49 | |
Kuiying Wang | 8f70621 | 2020-12-16 18:59:24 +0800 | [diff] [blame] | 50 | executable('biosconfig-password', |
| 51 | 'src/password.cpp', |
| 52 | implicit_include_directories: true, |
| 53 | include_directories: ['include'], |
| 54 | dependencies: deps, |
| 55 | cpp_args : boost_args, |
| 56 | install: true, |
| 57 | install_dir: get_option('bindir')) |
| 58 | |
Kuiying Wang | 642f437 | 2020-08-12 15:35:46 +0800 | [diff] [blame] | 59 | systemd = dependency('systemd') |
| 60 | systemd_system_unit_dir = systemd.get_pkgconfig_variable( |
| 61 | 'systemdsystemunitdir', |
| 62 | define_variable: ['prefix', get_option('prefix')]) |
| 63 | |
| 64 | configure_file( |
| 65 | copy: true, |
| 66 | input: 'service_files/xyz.openbmc_project.biosconfig_manager.service', |
| 67 | install: true, |
| 68 | install_dir: systemd_system_unit_dir, |
| 69 | output: 'xyz.openbmc_project.biosconfig_manager.service' |
| 70 | ) |
Kuiying Wang | 8f70621 | 2020-12-16 18:59:24 +0800 | [diff] [blame] | 71 | |
| 72 | configure_file( |
| 73 | copy: true, |
| 74 | input: 'service_files/xyz.openbmc_project.biosconfig_password.service', |
| 75 | install: true, |
| 76 | install_dir: systemd_system_unit_dir, |
| 77 | output: 'xyz.openbmc_project.biosconfig_password.service' |
| 78 | ) |