blob: f61957224c2ff5fd7d6410c98a0e49e52b213045 [file] [log] [blame]
Andrew Jefferye73bd0a2023-01-25 10:39:57 +10301conf_data = configuration_data()
Andrew Jefferyab8b0452024-01-11 09:55:51 +10302conf_data.set10(
3 'VALIDATION_UNSECURE_FEATURE',
4 get_option('validate-unsecure-feature').allowed(),
5)
6conf_data.set10(
7 'INSECURE_UNRESTRICTED_SENSOR_OVERRIDE',
8 get_option('insecure-sensor-override').allowed(),
9)
10configure_file(
11 input: 'dbus-sensor_config.h.in',
12 output: 'dbus-sensor_config.h',
13 configuration: conf_data,
14)
Andrew Jefferye73bd0a2023-01-25 10:39:57 +103015
16thresholds_a = static_library(
17 'thresholds_a',
18 'Thresholds.cpp',
19 dependencies: default_deps,
20)
21
22thresholds_dep = declare_dependency(
Andrew Jefferyab8b0452024-01-11 09:55:51 +103023 link_with: [thresholds_a],
Andrew Jefferye73bd0a2023-01-25 10:39:57 +103024 dependencies: default_deps,
25)
26
27utils_a = static_library(
28 'utils_a',
29 [
30 'FileHandle.cpp',
31 'SensorPaths.cpp',
32 'Utils.cpp',
33 ],
34 dependencies: default_deps,
35)
36
37utils_dep = declare_dependency(
Andrew Jefferyab8b0452024-01-11 09:55:51 +103038 link_with: [utils_a],
39 dependencies: [sdbusplus],
Andrew Jefferye73bd0a2023-01-25 10:39:57 +103040)
41
42devicemgmt_a = static_library(
43 'devicemgmt_a',
44 [
45 'DeviceMgmt.cpp',
46 ],
47 dependencies: default_deps,
48)
49
50devicemgmt_dep = declare_dependency(
Andrew Jefferyab8b0452024-01-11 09:55:51 +103051 link_with: [devicemgmt_a],
Andrew Jefferye73bd0a2023-01-25 10:39:57 +103052 dependencies: default_deps,
53)
54
55pwmsensor_a = static_library(
56 'pwmsensor_a',
57 'PwmSensor.cpp',
Andrew Jefferyab8b0452024-01-11 09:55:51 +103058 dependencies: [default_deps, thresholds_dep],
Andrew Jefferye73bd0a2023-01-25 10:39:57 +103059)
60
61pwmsensor_dep = declare_dependency(
Andrew Jefferyab8b0452024-01-11 09:55:51 +103062 link_with: [pwmsensor_a],
63 dependencies: [default_deps, thresholds_dep],
Andrew Jefferye73bd0a2023-01-25 10:39:57 +103064)
65
Brad Bishopfeb19ef2019-11-07 18:02:16 -050066peci_incdirs = []
67if not meson.get_compiler('cpp').has_header('linux/peci-ioctl.h')
68 peci_incdirs = ['../include']
69endif
70
Patrick Williams5bc307f2023-11-29 06:44:23 -060071if get_option('intel-cpu').allowed()
Andrew Jefferyab8b0452024-01-11 09:55:51 +103072 peci_dep = dependency('libpeci', required: true)
George Liud7be5552024-09-20 10:39:09 +080073 subdir('intel-cpu')
Oleksandr Shulzhenko77141ac2023-03-14 14:52:36 +010074endif
75
Patrick Williams5bc307f2023-11-29 06:44:23 -060076if get_option('adc').allowed()
George Liud7be5552024-09-20 10:39:09 +080077 subdir('adc')
Brad Bishopfeb19ef2019-11-07 18:02:16 -050078endif
79
Patrick Williams5bc307f2023-11-29 06:44:23 -060080if get_option('exit-air').allowed()
George Liud7be5552024-09-20 10:39:09 +080081 subdir('exit-air')
Brad Bishopfeb19ef2019-11-07 18:02:16 -050082endif
83
Patrick Williams5bc307f2023-11-29 06:44:23 -060084if get_option('fan').allowed()
George Liud7be5552024-09-20 10:39:09 +080085 subdir('fan')
Brad Bishopfeb19ef2019-11-07 18:02:16 -050086endif
87
Patrick Williams5bc307f2023-11-29 06:44:23 -060088if get_option('hwmon-temp').allowed()
George Liud7be5552024-09-20 10:39:09 +080089 subdir('hwmon-temp')
Brad Bishopfeb19ef2019-11-07 18:02:16 -050090endif
91
Patrick Williams5bc307f2023-11-29 06:44:23 -060092if get_option('intrusion').allowed()
George Liud7be5552024-09-20 10:39:09 +080093 subdir('intrusion')
Brad Bishopfeb19ef2019-11-07 18:02:16 -050094endif
95
Patrick Williams5bc307f2023-11-29 06:44:23 -060096if get_option('ipmb').allowed()
George Liud7be5552024-09-20 10:39:09 +080097 subdir('ipmb')
Brad Bishopfeb19ef2019-11-07 18:02:16 -050098endif
99
Patrick Williams5bc307f2023-11-29 06:44:23 -0600100if get_option('mcu').allowed()
George Liud7be5552024-09-20 10:39:09 +0800101 subdir('mcu')
Brad Bishopfeb19ef2019-11-07 18:02:16 -0500102endif
103
Patrick Williams5bc307f2023-11-29 06:44:23 -0600104if get_option('nvme').allowed()
George Liud7be5552024-09-20 10:39:09 +0800105 subdir('nvme')
Brad Bishopfeb19ef2019-11-07 18:02:16 -0500106endif
107
Patrick Williams5bc307f2023-11-29 06:44:23 -0600108if get_option('psu').allowed()
George Liud7be5552024-09-20 10:39:09 +0800109 subdir('psu')
Brad Bishopfeb19ef2019-11-07 18:02:16 -0500110endif
111
Patrick Williams5bc307f2023-11-29 06:44:23 -0600112if get_option('external').allowed()
George Liud7be5552024-09-20 10:39:09 +0800113 subdir('external')
114endif
115
116if get_option('tests').allowed()
117 subdir('tests')
Brad Bishopfeb19ef2019-11-07 18:02:16 -0500118endif