Tom Joseph | 82e9557 | 2020-05-07 20:28:05 +0530 | [diff] [blame] | 1 | project( |
| 2 | 'phosphor-srvcfg-manager', |
| 3 | 'cpp', |
| 4 | default_options: [ |
| 5 | 'warning_level=3', |
| 6 | 'werror=true', |
Patrick Williams | 053164c | 2021-10-06 15:40:56 -0500 | [diff] [blame] | 7 | 'cpp_std=c++20' |
Tom Joseph | 82e9557 | 2020-05-07 20:28:05 +0530 | [diff] [blame] | 8 | ], |
| 9 | license: 'Apache-2.0', |
| 10 | version: '1.0', |
Patrick Williams | 053164c | 2021-10-06 15:40:56 -0500 | [diff] [blame] | 11 | meson_version: '>=0.57.0', |
Tom Joseph | 82e9557 | 2020-05-07 20:28:05 +0530 | [diff] [blame] | 12 | ) |
| 13 | |
| 14 | # Wno-psabi reduces the number of "Note:" messages when cross-compiling some STL |
| 15 | # stuff for ARM. See https://stackoverflow.com/questions/48149323/strange-gcc-warning-when-compiling-qt-project |
| 16 | # Basically, gcc 6 and gcc 7 are not ABI compatible, but since the whole OpenBMC |
| 17 | # project uses the same compiler, we can safely ignmore these info notes. |
| 18 | add_project_arguments('-Wno-psabi', language: 'cpp') |
| 19 | |
| 20 | boost_args = ['-DBOOST_ALL_NO_LIB', |
| 21 | '-DBOOST_ASIO_DISABLE_THREADS', |
| 22 | '-DBOOST_COROUTINES_NO_DEPRECATION_WARNING', |
| 23 | '-DBOOST_ERROR_CODE_HEADER_ONLY', |
| 24 | '-DBOOST_NO_RTTI', |
| 25 | '-DBOOST_NO_TYPEID', |
| 26 | '-DBOOST_SYSTEM_NO_DEPRECATED'] |
| 27 | |
| 28 | deps = [dependency('boost'), |
| 29 | dependency('boost', modules : ['coroutine']), |
| 30 | dependency('phosphor-dbus-interfaces'), |
| 31 | dependency('phosphor-logging'), |
| 32 | dependency('sdbusplus'), |
| 33 | dependency('systemd'), |
| 34 | ] |
| 35 | |
| 36 | executable('phosphor-srvcfg-manager', |
| 37 | 'src/main.cpp', |
| 38 | 'src/srvcfg_manager.cpp', |
| 39 | 'src/utils.cpp', |
| 40 | implicit_include_directories: false, |
| 41 | include_directories: ['inc'], |
| 42 | dependencies: deps, |
| 43 | cpp_args : boost_args, |
| 44 | install: true, |
| 45 | install_dir: get_option('bindir')) |
| 46 | |
| 47 | systemd = dependency('systemd') |
Patrik Tesarik | 9cd8707 | 2021-06-02 19:42:40 +0200 | [diff] [blame^] | 48 | systemd_system_unit_dir = systemd.get_variable( |
| 49 | pkgconfig: 'systemdsystemunitdir', |
| 50 | pkgconfig_define: ['prefix', get_option('prefix')]) |
Tom Joseph | 82e9557 | 2020-05-07 20:28:05 +0530 | [diff] [blame] | 51 | |
| 52 | configure_file( |
| 53 | copy: true, |
| 54 | input: 'srvcfg-manager.service', |
| 55 | install: true, |
| 56 | install_dir: systemd_system_unit_dir, |
| 57 | output: 'srvcfg-manager.service' |
| 58 | ) |