blob: 9f35bc3be89fb8e86cb10b8fb967e879d8171468 [file] [log] [blame]
Tony Lee84d430c2019-06-13 15:26:15 +08001project(
2 'phosphor-nvme',
3 'cpp',
4 version: '1.0',
5 default_options: [
Patrick Williams839141e2023-07-12 11:15:33 -05006 'cpp_std=c++23',
Tony Lee84d430c2019-06-13 15:26:15 +08007 ],
Patrick Williams839141e2023-07-12 11:15:33 -05008 meson_version: '>=1.1.1',
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'),
Konstantin Aladyshev81b2e222024-04-22 18:32:29 +030024 dependency('nlohmann_json')
Tony Lee84d430c2019-06-13 15:26:15 +080025 ],
26 install: true,
27 install_dir: get_option('bindir')
28)
29
Tony Lee6c595012019-06-19 10:54:59 +080030install_data(sources : 'nvme_config.json', install_dir : '/etc/nvme')
31
Tony Lee84d430c2019-06-13 15:26:15 +080032conf_data = configuration_data()
33conf_data.set('NVME_REQUEST_NAME', '"xyz.openbmc_project.nvme.manager"')
34conf_data.set('NVME_OBJ_PATH_ROOT', '"/xyz/openbmc_project/sensors/temperature"')
35conf_data.set('NVME_OBJ_PATH', '"/xyz/openbmc_project/sensors/temperature/nvme"')
36conf_data.set('DBUS_PROPERTY_IFACE', '"org.freedesktop.DBus.Properties"')
Tony Lee89659212019-06-21 17:34:14 +080037conf_data.set('LED_GROUP_BUSNAME', '"xyz.openbmc_project.LED.GroupManager"')
38conf_data.set('LED_GROUP_IFACE', '"xyz.openbmc_project.Led.Group"')
39conf_data.set('LED_CONTROLLER_IFACE', '"xyz.openbmc_project.Led.Physical"')
40conf_data.set('ITEM_IFACE', '"xyz.openbmc_project.Inventory.Item"')
41conf_data.set('NVME_STATUS_IFACE', '"xyz.openbmc_project.Nvme.Status"')
42conf_data.set('ASSET_IFACE', '"xyz.openbmc_project.Inventory.Decorator.Asset"')
43conf_data.set('INVENTORY_BUSNAME', '"xyz.openbmc_project.Inventory.Manager"')
44conf_data.set('NVME_INVENTORY_PATH', '"/xyz/openbmc_project/inventory/system/chassis/motherboard/nvme"')
45conf_data.set('INVENTORY_NAMESPACE', '"/xyz/openbmc_project/inventory"')
46conf_data.set('INVENTORY_MANAGER_IFACE', '"xyz.openbmc_project.Inventory.Manager"')
Tony Lee84d430c2019-06-13 15:26:15 +080047
48configure_file(output : 'config.h',
49 configuration : conf_data)
Benjamin Fairfc8472c2020-04-10 13:33:54 -070050
51systemd = dependency('systemd')
52conf_data = configuration_data()
53conf_data.set('bindir', get_option('prefix') / get_option('bindir'))
54configure_file(
55 input: 'xyz.openbmc_project.nvme.manager.service.in',
56 output: 'xyz.openbmc_project.nvme.manager.service',
57 configuration: conf_data,
58 install: true,
Patrick Williamsf4d018b2023-04-12 08:01:11 -050059 install_dir: systemd.get_variable('systemdsystemunitdir'))