subprojects: Add libvpx wrap

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5105>
This commit is contained in:
L. E. Segovia 2023-08-07 22:22:14 -03:00 committed by GStreamer Marge Bot
parent 8710911e6b
commit 171eefa06b
2 changed files with 28 additions and 7 deletions

View file

@ -18,7 +18,7 @@ vpx_features = [
]
vpx_option = get_option('vpx')
vpx_dep = dependency('vpx', version : '>=1.7.0', required : vpx_option)
vpx_dep = dependency('vpx', version : '>=1.7.0', required : vpx_option, allow_fallback: true)
if vpx_dep.found()
vpx_args = []
@ -31,13 +31,27 @@ if vpx_dep.found()
const vpx_codec_iface_t *c = &@1@;
return c != 0;
}'''.format(header,codec_iface)
if cc.links(link_code, dependencies : vpx_dep)
vpx_args += extra_define
message('libvpx provides @0@ interface (@1@)'.format(f.get(3),f.get(1)))
have_vpx_feature = true
# Link-time checks are only compatible with externally supplied libraries
if vpx_dep.type_name() == 'internal'
vpx_codec = vpx_dep.get_variable(f.get(3).split(' ')[0].to_lower())
vpx_feature = vpx_dep.get_variable(f.get(3).to_lower().underscorify())
if vpx_feature == 'true' and vpx_codec == 'true'
vpx_args += extra_define
message('libvpx provides @0@ interface (@1@)'.format(f.get(3),f.get(1)))
have_vpx_feature = true
else
message('libvpx does not provide @0@ interface (@1@)'.format(f.get(3),f.get(1)))
have_vpx_feature = false
endif
else
message('libvpx does not provide @0@ interface (@1@)'.format(f.get(3),f.get(1)))
have_vpx_feature = false
if cc.links(link_code, dependencies : vpx_dep)
vpx_args += extra_define
message('libvpx provides @0@ interface (@1@)'.format(f.get(3),f.get(1)))
have_vpx_feature = true
else
message('libvpx does not provide @0@ interface (@1@)'.format(f.get(3),f.get(1)))
have_vpx_feature = false
endif
endif
set_variable('have_' + f.get(3).to_lower().underscorify(), have_vpx_feature)
endforeach

7
subprojects/vpx.wrap Normal file
View file

@ -0,0 +1,7 @@
[wrap-git]
url = https://gitlab.freedesktop.org/gstreamer/meson-ports/libvpx.git
revision = meson-1.13
clone-recursive = false
[provide]
dependency_names = vpx