Jonathan Doman | 366546c | 2023-07-24 12:33:16 -0700 | [diff] [blame] | 1 | cpp_args_smbios = boost_args |
| 2 | if get_option('dimm-dbus').allowed() |
Patrick Williams | 9d58391 | 2025-02-01 08:37:58 -0500 | [diff] [blame] | 3 | cpp_args_smbios += ['-DDIMM_DBUS'] |
Jonathan Doman | 366546c | 2023-07-24 12:33:16 -0700 | [diff] [blame] | 4 | endif |
| 5 | |
Josh Lehan | abdccd3 | 2024-01-26 15:49:50 -0800 | [diff] [blame] | 6 | if get_option('assoc-trim-path').allowed() |
Patrick Williams | 9d58391 | 2025-02-01 08:37:58 -0500 | [diff] [blame] | 7 | cpp_args_smbios += ['-DASSOC_TRIM_PATH'] |
Josh Lehan | abdccd3 | 2024-01-26 15:49:50 -0800 | [diff] [blame] | 8 | endif |
| 9 | |
Jonathan Doman | 366546c | 2023-07-24 12:33:16 -0700 | [diff] [blame] | 10 | if get_option('dimm-only-locator').allowed() |
Patrick Williams | 9d58391 | 2025-02-01 08:37:58 -0500 | [diff] [blame] | 11 | cpp_args_smbios += ['-DDIMM_ONLY_LOCATOR'] |
Jonathan Doman | 366546c | 2023-07-24 12:33:16 -0700 | [diff] [blame] | 12 | endif |
| 13 | |
Manojkiran Eda | ce89a37 | 2025-02-05 23:09:04 +0530 | [diff] [blame] | 14 | if get_option('slot-drive-presence').allowed() |
| 15 | cpp_args_smbios += ['-DSLOT_DRIVE_PRESENCE'] |
| 16 | endif |
| 17 | |
Prithvi Pai | 5af42bb | 2025-02-11 17:59:07 +0530 | [diff] [blame] | 18 | if get_option('tpm-dbus').allowed() |
| 19 | cpp_args_smbios += ['-DTPM_DBUS'] |
| 20 | endif |
| 21 | |
Prithvi Pai | 6f9e7a7 | 2025-03-14 13:05:02 +0530 | [diff] [blame^] | 22 | if get_option('firmware-inventory-dbus').allowed() |
| 23 | cpp_args_smbios += ['-DFIRMWARE_INVENTORY_DBUS'] |
| 24 | endif |
| 25 | |
| 26 | if get_option('expose-firmware-component-name').allowed() |
| 27 | cpp_args_smbios += ['-DEXPOSE_FW_COMPONENT_NAME'] |
| 28 | endif |
| 29 | |
Jonathan Doman | 366546c | 2023-07-24 12:33:16 -0700 | [diff] [blame] | 30 | executable( |
Patrick Williams | 9d58391 | 2025-02-01 08:37:58 -0500 | [diff] [blame] | 31 | 'smbiosmdrv2app', |
| 32 | 'mdrv2.cpp', |
| 33 | 'mdrv2_main.cpp', |
| 34 | 'cpu.cpp', |
| 35 | 'dimm.cpp', |
| 36 | 'system.cpp', |
| 37 | 'pcieslot.cpp', |
Prithvi Pai | 5af42bb | 2025-02-11 17:59:07 +0530 | [diff] [blame] | 38 | 'tpm.cpp', |
Prithvi Pai | 6f9e7a7 | 2025-03-14 13:05:02 +0530 | [diff] [blame^] | 39 | 'firmware_inventory.cpp', |
Patrick Williams | 9d58391 | 2025-02-01 08:37:58 -0500 | [diff] [blame] | 40 | cpp_args: cpp_args_smbios, |
Jonathan Doman | 366546c | 2023-07-24 12:33:16 -0700 | [diff] [blame] | 41 | dependencies: [ |
Patrick Williams | 9d58391 | 2025-02-01 08:37:58 -0500 | [diff] [blame] | 42 | boost_dep, |
| 43 | sdbusplus_dep, |
| 44 | phosphor_logging_dep, |
| 45 | phosphor_dbus_interfaces_dep, |
Jonathan Doman | 366546c | 2023-07-24 12:33:16 -0700 | [diff] [blame] | 46 | ], |
| 47 | implicit_include_directories: false, |
| 48 | include_directories: root_inc, |
| 49 | install: true, |
Patrick Williams | 9d58391 | 2025-02-01 08:37:58 -0500 | [diff] [blame] | 50 | ) |
| 51 | |
| 52 | if get_option('cpuinfo').allowed() |
| 53 | cpp = meson.get_compiler('cpp') |
| 54 | # i2c-tools provides no pkgconfig so we need to find it manually |
| 55 | i2c_dep = cpp.find_library('i2c') |
| 56 | |
| 57 | peci_dep = [] |
| 58 | peci_flag = [] |
| 59 | peci_files = [] |
| 60 | if get_option('cpuinfo-peci').allowed() |
| 61 | peci_flag = '-DPECI_ENABLED=1' |
| 62 | peci_dep = dependency('libpeci') |
| 63 | peci_files = ['speed_select.cpp', 'sst_mailbox.cpp'] |
| 64 | endif |
| 65 | |
| 66 | executable( |
| 67 | 'cpuinfoapp', |
| 68 | 'cpuinfo_main.cpp', |
| 69 | 'cpuinfo_utils.cpp', |
| 70 | peci_files, |
| 71 | cpp_args: boost_args + peci_flag, |
| 72 | dependencies: [ |
| 73 | boost_dep, |
| 74 | sdbusplus_dep, |
| 75 | phosphor_logging_dep, |
| 76 | phosphor_dbus_interfaces_dep, |
| 77 | i2c_dep, |
| 78 | peci_dep, |
| 79 | ], |
| 80 | implicit_include_directories: false, |
| 81 | include_directories: root_inc, |
| 82 | install: true, |
| 83 | ) |
Jonathan Doman | 366546c | 2023-07-24 12:33:16 -0700 | [diff] [blame] | 84 | endif |
| 85 | |
| 86 | if get_option('smbios-ipmi-blob').allowed() |
Patrick Williams | 9d58391 | 2025-02-01 08:37:58 -0500 | [diff] [blame] | 87 | subdir('smbios-ipmi-blobs') |
Jonathan Doman | 366546c | 2023-07-24 12:33:16 -0700 | [diff] [blame] | 88 | endif |