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:
16
meson.build
16
meson.build
@@ -2064,21 +2064,9 @@ if get_option('gallium-extra-hud')
|
|||||||
pre_args += '-DHAVE_GALLIUM_EXTRA_HUD=1'
|
pre_args += '-DHAVE_GALLIUM_EXTRA_HUD=1'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
_sensors = get_option('lmsensors')
|
dep_lmsensors = cc.find_library('sensors', required : get_option('lmsensors'))
|
||||||
if _sensors == 'true'
|
if dep_lmsensors.found()
|
||||||
_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'
|
pre_args += '-DHAVE_LIBSENSORS=1'
|
||||||
endif
|
|
||||||
else
|
|
||||||
dep_lmsensors = null_dep
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
_shader_replacement = get_option('custom-shader-replacement')
|
_shader_replacement = get_option('custom-shader-replacement')
|
||||||
|
@@ -345,9 +345,7 @@ option(
|
|||||||
)
|
)
|
||||||
option(
|
option(
|
||||||
'lmsensors',
|
'lmsensors',
|
||||||
type : 'combo',
|
type : 'feature',
|
||||||
value : 'auto',
|
|
||||||
choices : ['auto', 'true', 'false', 'enabled', 'disabled'],
|
|
||||||
description : 'Enable HUD lmsensors support.'
|
description : 'Enable HUD lmsensors support.'
|
||||||
)
|
)
|
||||||
option(
|
option(
|
||||||
|
Reference in New Issue
Block a user