meson: simplify video-codecs option parsing
The extra `all_free` that now remains in the list will be ignored in the loop below anyway so there is no need to have complex code to try to remove it. This also means it becomes possible to set things like `-D video-codecs=all_free,vc1dec`. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33949>
This commit is contained in:
committed by
Marge Bot
parent
95161bb13d
commit
1f93dd7d37
@@ -386,13 +386,7 @@ all_codecs = patent_codecs + free_codecs
|
||||
if _codecs.contains('all')
|
||||
_codecs = all_codecs
|
||||
elif _codecs.contains('all_free')
|
||||
selected_codecs = _codecs
|
||||
_codecs = free_codecs
|
||||
foreach c : patent_codecs
|
||||
if selected_codecs.contains(c)
|
||||
_codecs += c
|
||||
endif
|
||||
endforeach
|
||||
_codecs += free_codecs
|
||||
endif
|
||||
foreach c : all_codecs
|
||||
pre_args += '-DVIDEO_CODEC_@0@=@1@'.format(c.to_upper(), _codecs.contains(c).to_int())
|
||||
|
||||
Reference in New Issue
Block a user