mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-20 14:18:34 +00:00
vpx: Error out if enabled and no features found
Seee: https://gitlab.freedesktop.org/gstreamer/cerbero/issues/200
This commit is contained in:
parent
e9c10713a3
commit
212d0ca3cb
1 changed files with 9 additions and 2 deletions
|
@ -16,7 +16,8 @@ vpx_features = [
|
||||||
[ 'vpx/vp8dx.h', 'vpx_codec_vp9_dx_algo', '-DHAVE_VP9_DECODER', 'VP9 decoder' ],
|
[ 'vpx/vp8dx.h', 'vpx_codec_vp9_dx_algo', '-DHAVE_VP9_DECODER', 'VP9 decoder' ],
|
||||||
]
|
]
|
||||||
|
|
||||||
vpx_dep = dependency('vpx', version : '>=1.5.0', required : get_option('vpx'))
|
vpx_option = get_option('vpx')
|
||||||
|
vpx_dep = dependency('vpx', version : '>=1.5.0', required : vpx_option)
|
||||||
|
|
||||||
if vpx_dep.found()
|
if vpx_dep.found()
|
||||||
vpx_args = []
|
vpx_args = []
|
||||||
|
@ -41,7 +42,13 @@ if vpx_dep.found()
|
||||||
endforeach
|
endforeach
|
||||||
|
|
||||||
if vpx_args.length() == 0
|
if vpx_args.length() == 0
|
||||||
message('WARNING: libvpx was built without any encoder or decoder features!')
|
msg = 'libvpx was built without any encoder or decoder features!'
|
||||||
|
# Error out if explicitly enabled, but continue with a warning if the
|
||||||
|
# plugin is in auto-detect mode to reduce build-time friction.
|
||||||
|
if vpx_option.enabled()
|
||||||
|
error(msg)
|
||||||
|
endif
|
||||||
|
warning(msg)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if vpx_dep.version().version_compare('>= 1.8.0')
|
if vpx_dep.version().version_compare('>= 1.8.0')
|
||||||
|
|
Loading…
Reference in a new issue