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:
Dylan Baker 2022-12-20 15:43:55 -08:00 committed by Marge Bot
parent 202344e9a0
commit 2653fe11c9
2 changed files with 4 additions and 18 deletions

View File

@ -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')

View File

@ -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(