build: update for gl pkg-config file split

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1462>
This commit is contained in:
Matthew Waters 2020-07-24 17:31:36 +10:00
parent fbbacdb856
commit d1667da0c3
3 changed files with 24 additions and 6 deletions

View file

@ -300,6 +300,11 @@ gstcheck_dep = dependency('gstreamer-check-1.0', version : gst_req,
# GStreamer OpenGL
gstgl_dep = dependency('gstreamer-gl-1.0', version : gst_req,
fallback : ['gst-plugins-base', 'gstgl_dep'], required: get_option('gl'))
gstglproto_dep = dependency('gstreamer-gl-prototypes-1.0', version : gst_req,
fallback : ['gst-plugins-base', 'gstglproto_dep'], required: get_option('gl'))
gstglx11_dep = dependency('', required : false)
gstglwayland_dep = dependency('', required : false)
gstglegl_dep = dependency('', required : false)
if gstgl_dep.found()
if gstgl_dep.type_name() == 'pkgconfig'
@ -327,11 +332,24 @@ if gstgl_dep.found()
foreach api : ['gl', 'gles2']
set_variable('gst_gl_have_api_@0@'.format(api), gst_gl_apis.contains(api))
# temporary backwards compat for older meson-generated .pc file with 'opengl' instead of 'gl'
if gst_gl_apis.contains('opengl')
gst_gl_have_api_gl = true
endif
endforeach
# Behind specific checks because meson fails at optional dependencies with a
# fallback to the same subproject. On the first failure, meson will never
# check the system again even if the fallback never existed.
# Last checked with meson 0.54.3
if gst_gl_have_window_x11
gstglx11_dep = dependency('gstreamer-gl-x11-1.0', version : gst_req,
fallback : ['gst-plugins-base', 'gstglx11_dep'], required: true)
endif
if gst_gl_have_window_wayland
gstglwayland_dep = dependency('gstreamer-gl-wayland-1.0', version : gst_req,
fallback : ['gst-plugins-base', 'gstglwayland_dep'], required: true)
endif
if gst_gl_have_platform_egl
gstglegl_dep = dependency('gstreamer-gl-egl-1.0', version : gst_req,
fallback : ['gst-plugins-base', 'gstglegl_dep'], required: true)
endif
endif
libm = cc.find_library('m', required : false)

View file

@ -108,7 +108,7 @@ if applemedia_found_deps
objcpp_args : gst_plugins_bad_args + applemedia_args + applemedia_objc_args,
link_args : noseh_link_args,
include_directories : [configinc, libsinc],
dependencies : [gstvideo_dep, gstaudio_dep, gstpbutils_dep, gst_dep, gstbase_dep, gstgl_dep] + applemedia_frameworks,
dependencies : [gstvideo_dep, gstaudio_dep, gstpbutils_dep, gst_dep, gstbase_dep, gstgl_dep, gstglproto_dep] + applemedia_frameworks,
install : true,
install_dir : plugins_install_dir,
)

View file

@ -29,7 +29,7 @@ gstnvcodec = library('gstnvcodec',
nvcodec_sources,
c_args : gst_plugins_bad_args + extra_c_args,
include_directories : plugin_incdirs,
dependencies : [gstbase_dep, gstvideo_dep, gstpbutils_dep, gstgl_dep, gmodule_dep, gstcodecs_dep],
dependencies : [gstbase_dep, gstvideo_dep, gstpbutils_dep, gstgl_dep, gstglproto_dep, gmodule_dep, gstcodecs_dep],
install : true,
install_dir : plugins_install_dir,
)