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