mirror of https://gitlab.freedesktop.org/mesa/mesa
meson: use a feature option for lmsensors
Reviewed-by: Jesse Natalie <jenatali@microsoft.com> Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20409>
This commit is contained in:
parent
202344e9a0
commit
2653fe11c9
18
meson.build
18
meson.build
|
@ -2064,21 +2064,9 @@ if get_option('gallium-extra-hud')
|
|||
pre_args += '-DHAVE_GALLIUM_EXTRA_HUD=1'
|
||||
endif
|
||||
|
||||
_sensors = get_option('lmsensors')
|
||||
if _sensors == 'true'
|
||||
_sensors = 'enabled'
|
||||
warning('lmsensors option "true" deprecated, please use "enabled" instead.')
|
||||
elif _sensors == 'false'
|
||||
_sensors = 'disabled'
|
||||
warning('lmsensors option "false" deprecated, please use "disabled" instead.')
|
||||
endif
|
||||
if _sensors != 'disabled'
|
||||
dep_lmsensors = cc.find_library('sensors', required : _sensors == 'enabled')
|
||||
if dep_lmsensors.found()
|
||||
pre_args += '-DHAVE_LIBSENSORS=1'
|
||||
endif
|
||||
else
|
||||
dep_lmsensors = null_dep
|
||||
dep_lmsensors = cc.find_library('sensors', required : get_option('lmsensors'))
|
||||
if dep_lmsensors.found()
|
||||
pre_args += '-DHAVE_LIBSENSORS=1'
|
||||
endif
|
||||
|
||||
_shader_replacement = get_option('custom-shader-replacement')
|
||||
|
|
|
@ -345,9 +345,7 @@ option(
|
|||
)
|
||||
option(
|
||||
'lmsensors',
|
||||
type : 'combo',
|
||||
value : 'auto',
|
||||
choices : ['auto', 'true', 'false', 'enabled', 'disabled'],
|
||||
type : 'feature',
|
||||
description : 'Enable HUD lmsensors support.'
|
||||
)
|
||||
option(
|
||||
|
|
Loading…
Reference in New Issue