blob: 381b5d5075bf767265716cab54396dcafee4dbb8 [file] [log] [blame]
Tony Lee84d430c2019-06-13 15:26:15 +08001project(
2 'phosphor-nvme',
3 'cpp',
4 version: '1.0',
5 default_options: [
Patrick Williamsbc10c7d2021-10-06 15:38:18 -05006 'cpp_std=c++20',
Tony Lee84d430c2019-06-13 15:26:15 +08007 ],
Patrick Williamsbc10c7d2021-10-06 15:38:18 -05008 meson_version: '>=0.57.0',
Tony Lee84d430c2019-06-13 15:26:15 +08009)
10
11executable(
12 'nvme_main',
13 [
14 'nvme_main.cpp',
15 'nvme_manager.cpp',
Tony Lee6c595012019-06-19 10:54:59 +080016 'smbus.cpp',
17 'nvmes.cpp',
Tony Lee84d430c2019-06-13 15:26:15 +080018 ],
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 Lee6c595012019-06-19 10:54:59 +080029install_data(sources : 'nvme_config.json', install_dir : '/etc/nvme')
30
Tony Lee84d430c2019-06-13 15:26:15 +080031conf_data = configuration_data()
32conf_data.set('NVME_REQUEST_NAME', '"xyz.openbmc_project.nvme.manager"')
33conf_data.set('NVME_OBJ_PATH_ROOT', '"/xyz/openbmc_project/sensors/temperature"')
34conf_data.set('NVME_OBJ_PATH', '"/xyz/openbmc_project/sensors/temperature/nvme"')
35conf_data.set('DBUS_PROPERTY_IFACE', '"org.freedesktop.DBus.Properties"')
Tony Lee89659212019-06-21 17:34:14 +080036conf_data.set('LED_GROUP_BUSNAME', '"xyz.openbmc_project.LED.GroupManager"')
37conf_data.set('LED_GROUP_IFACE', '"xyz.openbmc_project.Led.Group"')
38conf_data.set('LED_CONTROLLER_IFACE', '"xyz.openbmc_project.Led.Physical"')
39conf_data.set('ITEM_IFACE', '"xyz.openbmc_project.Inventory.Item"')
40conf_data.set('NVME_STATUS_IFACE', '"xyz.openbmc_project.Nvme.Status"')
41conf_data.set('ASSET_IFACE', '"xyz.openbmc_project.Inventory.Decorator.Asset"')
42conf_data.set('INVENTORY_BUSNAME', '"xyz.openbmc_project.Inventory.Manager"')
43conf_data.set('NVME_INVENTORY_PATH', '"/xyz/openbmc_project/inventory/system/chassis/motherboard/nvme"')
44conf_data.set('INVENTORY_NAMESPACE', '"/xyz/openbmc_project/inventory"')
45conf_data.set('INVENTORY_MANAGER_IFACE', '"xyz.openbmc_project.Inventory.Manager"')
Tony Lee84d430c2019-06-13 15:26:15 +080046
47configure_file(output : 'config.h',
48 configuration : conf_data)
Benjamin Fairfc8472c2020-04-10 13:33:54 -070049
50systemd = dependency('systemd')
51conf_data = configuration_data()
52conf_data.set('bindir', get_option('prefix') / get_option('bindir'))
53configure_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'))