blob: 1c983bd1980273ffa1141ba00ece4f1fb47bd16b [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
Jonathan Doman366546c2023-07-24 12:33:16 -070018executable(
Patrick Williams9d583912025-02-01 08:37:58 -050019 'smbiosmdrv2app',
20 'mdrv2.cpp',
21 'mdrv2_main.cpp',
22 'cpu.cpp',
23 'dimm.cpp',
24 'system.cpp',
25 'pcieslot.cpp',
26 cpp_args: cpp_args_smbios,
Jonathan Doman366546c2023-07-24 12:33:16 -070027 dependencies: [
Patrick Williams9d583912025-02-01 08:37:58 -050028 boost_dep,
29 sdbusplus_dep,
30 phosphor_logging_dep,
31 phosphor_dbus_interfaces_dep,
Jonathan Doman366546c2023-07-24 12:33:16 -070032 ],
33 implicit_include_directories: false,
34 include_directories: root_inc,
35 install: true,
Patrick Williams9d583912025-02-01 08:37:58 -050036)
37
38if get_option('cpuinfo').allowed()
39 cpp = meson.get_compiler('cpp')
40 # i2c-tools provides no pkgconfig so we need to find it manually
41 i2c_dep = cpp.find_library('i2c')
42
43 peci_dep = []
44 peci_flag = []
45 peci_files = []
46 if get_option('cpuinfo-peci').allowed()
47 peci_flag = '-DPECI_ENABLED=1'
48 peci_dep = dependency('libpeci')
49 peci_files = ['speed_select.cpp', 'sst_mailbox.cpp']
50 endif
51
52 executable(
53 'cpuinfoapp',
54 'cpuinfo_main.cpp',
55 'cpuinfo_utils.cpp',
56 peci_files,
57 cpp_args: boost_args + peci_flag,
58 dependencies: [
59 boost_dep,
60 sdbusplus_dep,
61 phosphor_logging_dep,
62 phosphor_dbus_interfaces_dep,
63 i2c_dep,
64 peci_dep,
65 ],
66 implicit_include_directories: false,
67 include_directories: root_inc,
68 install: true,
69 )
Jonathan Doman366546c2023-07-24 12:33:16 -070070endif
71
72if get_option('smbios-ipmi-blob').allowed()
Patrick Williams9d583912025-02-01 08:37:58 -050073 subdir('smbios-ipmi-blobs')
Jonathan Doman366546c2023-07-24 12:33:16 -070074endif