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