blob: 3a2bc17a2fe1ad2793155d4cc158ed88ab165b0d [file] [log] [blame]
Jonathan Doman366546c2023-07-24 12:33:16 -07001cpp_args_smbios = boost_args
2if get_option('dimm-dbus').allowed()
Patrick Williams9d583912025-02-01 08:37:58 -05003 cpp_args_smbios += ['-DDIMM_DBUS']
Jonathan Doman366546c2023-07-24 12:33:16 -07004endif
5
Josh Lehanabdccd32024-01-26 15:49:50 -08006if get_option('assoc-trim-path').allowed()
Patrick Williams9d583912025-02-01 08:37:58 -05007 cpp_args_smbios += ['-DASSOC_TRIM_PATH']
Josh Lehanabdccd32024-01-26 15:49:50 -08008endif
9
Jonathan Doman366546c2023-07-24 12:33:16 -070010if get_option('dimm-only-locator').allowed()
Patrick Williams9d583912025-02-01 08:37:58 -050011 cpp_args_smbios += ['-DDIMM_ONLY_LOCATOR']
Jonathan Doman366546c2023-07-24 12:33:16 -070012endif
13
Manojkiran Edace89a372025-02-05 23:09:04 +053014if get_option('slot-drive-presence').allowed()
15 cpp_args_smbios += ['-DSLOT_DRIVE_PRESENCE']
16endif
17
Prithvi Pai5af42bb2025-02-11 17:59:07 +053018if get_option('tpm-dbus').allowed()
19 cpp_args_smbios += ['-DTPM_DBUS']
20endif
21
Jonathan Doman366546c2023-07-24 12:33:16 -070022executable(
Patrick Williams9d583912025-02-01 08:37:58 -050023 'smbiosmdrv2app',
24 'mdrv2.cpp',
25 'mdrv2_main.cpp',
26 'cpu.cpp',
27 'dimm.cpp',
28 'system.cpp',
29 'pcieslot.cpp',
Prithvi Pai5af42bb2025-02-11 17:59:07 +053030 'tpm.cpp',
Patrick Williams9d583912025-02-01 08:37:58 -050031 cpp_args: cpp_args_smbios,
Jonathan Doman366546c2023-07-24 12:33:16 -070032 dependencies: [
Patrick Williams9d583912025-02-01 08:37:58 -050033 boost_dep,
34 sdbusplus_dep,
35 phosphor_logging_dep,
36 phosphor_dbus_interfaces_dep,
Jonathan Doman366546c2023-07-24 12:33:16 -070037 ],
38 implicit_include_directories: false,
39 include_directories: root_inc,
40 install: true,
Patrick Williams9d583912025-02-01 08:37:58 -050041)
42
43if get_option('cpuinfo').allowed()
44 cpp = meson.get_compiler('cpp')
45 # i2c-tools provides no pkgconfig so we need to find it manually
46 i2c_dep = cpp.find_library('i2c')
47
48 peci_dep = []
49 peci_flag = []
50 peci_files = []
51 if get_option('cpuinfo-peci').allowed()
52 peci_flag = '-DPECI_ENABLED=1'
53 peci_dep = dependency('libpeci')
54 peci_files = ['speed_select.cpp', 'sst_mailbox.cpp']
55 endif
56
57 executable(
58 'cpuinfoapp',
59 'cpuinfo_main.cpp',
60 'cpuinfo_utils.cpp',
61 peci_files,
62 cpp_args: boost_args + peci_flag,
63 dependencies: [
64 boost_dep,
65 sdbusplus_dep,
66 phosphor_logging_dep,
67 phosphor_dbus_interfaces_dep,
68 i2c_dep,
69 peci_dep,
70 ],
71 implicit_include_directories: false,
72 include_directories: root_inc,
73 install: true,
74 )
Jonathan Doman366546c2023-07-24 12:33:16 -070075endif
76
77if get_option('smbios-ipmi-blob').allowed()
Patrick Williams9d583912025-02-01 08:37:58 -050078 subdir('smbios-ipmi-blobs')
Jonathan Doman366546c2023-07-24 12:33:16 -070079endif