pkgconfig: fix gstreamer-plugins-base-1.0 .pc files for no OpenGL case

Don't put gl into the libraries list if the gst-gl library isn't
being built, and also don't include it in the list of linker flags
then.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/613

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/742>
This commit is contained in:
Tim-Philipp Müller 2020-07-08 15:15:34 +01:00
parent 55f10f31d4
commit dcce44f295
3 changed files with 10 additions and 4 deletions

View file

@ -10,7 +10,7 @@ Name: GStreamer Base Plugins Libraries, Uninstalled
Description: Streaming media framework, base plugins libraries, uninstalled
Version: @VERSION@
Requires: gstreamer-@GST_API_VERSION@
Libs: -L@allocatorslibdir@ -L@applibdir@ -L@audiolibdir@ -L@fftlibdir@ -L@pbutilslibdir@ -L@rifflibdir@ -L@rtplibdir@ -L@rtsplibdir@ -L@sdplibdir@ -L@taglibdir@ -L@videolibdir@ -L@gllibdir@
Libs: -L@allocatorslibdir@ -L@applibdir@ -L@audiolibdir@ -L@fftlibdir@ -L@pbutilslibdir@ -L@rifflibdir@ -L@rtplibdir@ -L@rtsplibdir@ -L@sdplibdir@ -L@taglibdir@ -L@videolibdir@ @glliblinkerflag@
Cflags: -I@abs_top_srcdir@/gst-libs -I@abs_top_builddir@/gst-libs
libraries=allocators app audio fft pbutils riff rtp rtsp sdp tag video gl
libraries=allocators app audio fft pbutils riff rtp rtsp sdp tag video @gl_lib_name@

View file

@ -11,4 +11,4 @@ Version: @VERSION@
Libs: -L${libdir}
Cflags: -I${includedir}
libraries=allocators app audio fft pbutils riff rtp rtsp sdp tag video gl
libraries=allocators app audio fft pbutils riff rtp rtsp sdp tag video @gl_lib_name@

View file

@ -44,11 +44,17 @@ pkg_files = [
# XXX: requires the meson.build to be parsed/executed after gst-libs/gl/meson.build
if build_gstgl
pkgconf.set('gllibdir', join_paths(meson.build_root(), gstgl.outdir()))
gllibdir = join_paths(meson.build_root(), gstgl.outdir())
pkgconf.set('gllibdir', gllibdir)
pkgconf.set('glliblinkerflag', '-L' + gllibdir)
pkg_files += ['gstreamer-gl']
pkgconf.set('GL_APIS', ' '.join(enabled_gl_apis))
pkgconf.set('GL_WINDOWS', ' '.join(enabled_gl_winsys))
pkgconf.set('GL_PLATFORMS', ' '.join(enabled_gl_platforms))
pkgconf.set('gl_lib_name', 'gl')
else
pkgconf.set('glliblinkerflag', '')
pkgconf.set('gl_lib_name', '')
endif
foreach p : pkg_files