mirror of https://gitlab.freedesktop.org/mesa/mesa
meson: use a feature option for zstd
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
e3f60ea4a8
commit
afa97e7468
18
meson.build
18
meson.build
|
@ -1458,21 +1458,9 @@ if dep_zlib.found()
|
||||||
pre_args += '-DHAVE_ZLIB'
|
pre_args += '-DHAVE_ZLIB'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
_zstd = get_option('zstd')
|
dep_zstd = dependency('libzstd', required : get_option('zstd'))
|
||||||
if _zstd == 'true'
|
if dep_zstd.found()
|
||||||
_zstd = 'enabled'
|
pre_args += '-DHAVE_ZSTD'
|
||||||
warning('zstd option "true" deprecated, please use "enabled" instead.')
|
|
||||||
elif _zstd == 'false'
|
|
||||||
_zstd = 'disabled'
|
|
||||||
warning('zstd option "false" deprecated, please use "disabled" instead.')
|
|
||||||
endif
|
|
||||||
if _zstd != 'disabled'
|
|
||||||
dep_zstd = dependency('libzstd', required : _zstd == 'enabled')
|
|
||||||
if dep_zstd.found()
|
|
||||||
pre_args += '-DHAVE_ZSTD'
|
|
||||||
endif
|
|
||||||
else
|
|
||||||
dep_zstd = null_dep
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
with_compression = dep_zlib.found() or dep_zstd.found()
|
with_compression = dep_zlib.found() or dep_zstd.found()
|
||||||
|
|
|
@ -442,9 +442,7 @@ option(
|
||||||
)
|
)
|
||||||
option(
|
option(
|
||||||
'zstd',
|
'zstd',
|
||||||
type : 'combo',
|
type : 'feature',
|
||||||
choices : ['auto', 'true', 'false', 'enabled', 'disabled'],
|
|
||||||
value : 'auto',
|
|
||||||
description : 'Use ZSTD instead of ZLIB in some cases.'
|
description : 'Use ZSTD instead of ZLIB in some cases.'
|
||||||
)
|
)
|
||||||
option(
|
option(
|
||||||
|
|
Loading…
Reference in New Issue