Tony Lee | 84d430c | 2019-06-13 15:26:15 +0800 | [diff] [blame] | 1 | project( |
| 2 | 'phosphor-nvme', |
| 3 | 'cpp', |
| 4 | version: '1.0', |
| 5 | default_options: [ |
Patrick Williams | bc10c7d | 2021-10-06 15:38:18 -0500 | [diff] [blame] | 6 | 'cpp_std=c++20', |
Tony Lee | 84d430c | 2019-06-13 15:26:15 +0800 | [diff] [blame] | 7 | ], |
Patrick Williams | bc10c7d | 2021-10-06 15:38:18 -0500 | [diff] [blame] | 8 | meson_version: '>=0.57.0', |
Tony Lee | 84d430c | 2019-06-13 15:26:15 +0800 | [diff] [blame] | 9 | ) |
| 10 | |
| 11 | executable( |
| 12 | 'nvme_main', |
| 13 | [ |
| 14 | 'nvme_main.cpp', |
| 15 | 'nvme_manager.cpp', |
Tony Lee | 6c59501 | 2019-06-19 10:54:59 +0800 | [diff] [blame] | 16 | 'smbus.cpp', |
| 17 | 'nvmes.cpp', |
Tony Lee | 84d430c | 2019-06-13 15:26:15 +0800 | [diff] [blame] | 18 | ], |
| 19 | dependencies: [ |
| 20 | dependency('phosphor-logging'), |
| 21 | dependency('sdbusplus'), |
| 22 | dependency('phosphor-dbus-interfaces'), |
| 23 | dependency('sdeventplus'), |
| 24 | ], |
| 25 | install: true, |
| 26 | install_dir: get_option('bindir') |
| 27 | ) |
| 28 | |
Tony Lee | 6c59501 | 2019-06-19 10:54:59 +0800 | [diff] [blame] | 29 | install_data(sources : 'nvme_config.json', install_dir : '/etc/nvme') |
| 30 | |
Tony Lee | 84d430c | 2019-06-13 15:26:15 +0800 | [diff] [blame] | 31 | conf_data = configuration_data() |
| 32 | conf_data.set('NVME_REQUEST_NAME', '"xyz.openbmc_project.nvme.manager"') |
| 33 | conf_data.set('NVME_OBJ_PATH_ROOT', '"/xyz/openbmc_project/sensors/temperature"') |
| 34 | conf_data.set('NVME_OBJ_PATH', '"/xyz/openbmc_project/sensors/temperature/nvme"') |
| 35 | conf_data.set('DBUS_PROPERTY_IFACE', '"org.freedesktop.DBus.Properties"') |
Tony Lee | 8965921 | 2019-06-21 17:34:14 +0800 | [diff] [blame] | 36 | conf_data.set('LED_GROUP_BUSNAME', '"xyz.openbmc_project.LED.GroupManager"') |
| 37 | conf_data.set('LED_GROUP_IFACE', '"xyz.openbmc_project.Led.Group"') |
| 38 | conf_data.set('LED_CONTROLLER_IFACE', '"xyz.openbmc_project.Led.Physical"') |
| 39 | conf_data.set('ITEM_IFACE', '"xyz.openbmc_project.Inventory.Item"') |
| 40 | conf_data.set('NVME_STATUS_IFACE', '"xyz.openbmc_project.Nvme.Status"') |
| 41 | conf_data.set('ASSET_IFACE', '"xyz.openbmc_project.Inventory.Decorator.Asset"') |
| 42 | conf_data.set('INVENTORY_BUSNAME', '"xyz.openbmc_project.Inventory.Manager"') |
| 43 | conf_data.set('NVME_INVENTORY_PATH', '"/xyz/openbmc_project/inventory/system/chassis/motherboard/nvme"') |
| 44 | conf_data.set('INVENTORY_NAMESPACE', '"/xyz/openbmc_project/inventory"') |
| 45 | conf_data.set('INVENTORY_MANAGER_IFACE', '"xyz.openbmc_project.Inventory.Manager"') |
Tony Lee | 84d430c | 2019-06-13 15:26:15 +0800 | [diff] [blame] | 46 | |
| 47 | configure_file(output : 'config.h', |
| 48 | configuration : conf_data) |
Benjamin Fair | fc8472c | 2020-04-10 13:33:54 -0700 | [diff] [blame] | 49 | |
| 50 | systemd = dependency('systemd') |
| 51 | conf_data = configuration_data() |
| 52 | conf_data.set('bindir', get_option('prefix') / get_option('bindir')) |
| 53 | configure_file( |
| 54 | input: 'xyz.openbmc_project.nvme.manager.service.in', |
| 55 | output: 'xyz.openbmc_project.nvme.manager.service', |
| 56 | configuration: conf_data, |
| 57 | install: true, |
| 58 | install_dir: systemd.get_pkgconfig_variable('systemdsystemunitdir')) |