| boost = dependency('boost',version : '>=1.79.0', required : false, include_type: 'system') |
| if not boost.found() |
| subproject('boost', required: false) |
| boost_inc = include_directories('subprojects/boost_1_79_0/', is_system:true) |
| boost = declare_dependency(include_directories : boost_inc) |
| boost = boost.as_system('system') |
| endif |
| |
| # i2c-tools doesn't ship a pkg-config file for libi2c |
| i2c = meson.get_compiler('cpp').find_library('i2c') |
| |
| executable( |
| 'google_secured_nvme_usb_reset', |
| 'utils.cpp', |
| 'main.cpp', |
| cpp_args: [ |
| '-DBOOST_SYSTEM_NO_DEPRECATED', |
| '-DBOOST_ERROR_CODE_HEADER_ONLY', |
| '-DBOOST_NO_RTTI', |
| '-DBOOST_NO_TYPEID', |
| '-DBOOST_ALL_NO_LIB', |
| '-DBOOST_ALLOW_DEPRECATED_HEADERS', |
| '-DBOOST_ASIO_HAS_THREADS', |
| ], |
| dependencies:[sdbusplus_dep, boost, i2c], |
| install: true, |
| install_dir: get_option('libexecdir')) |
| |
| if systemd_dep.found() |
| configure_file( |
| input: 'google_secured_nvme_usb_reset.service.in', |
| output: 'google_secured_nvme_usb_reset.service', |
| configuration: conf_data, |
| install: true, |
| install_dir: unit_dir) |
| endif |