From dcce44f295290371ea496732af4cd76beb7862e3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim-Philipp=20M=C3=BCller?= Date: Wed, 8 Jul 2020 15:15:34 +0100 Subject: [PATCH] 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: --- pkgconfig/gstreamer-plugins-base-uninstalled.pc.in | 4 ++-- pkgconfig/gstreamer-plugins-base.pc.in | 2 +- pkgconfig/meson.build | 8 +++++++- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/pkgconfig/gstreamer-plugins-base-uninstalled.pc.in b/pkgconfig/gstreamer-plugins-base-uninstalled.pc.in index 34c6181..300b04b 100644 --- a/pkgconfig/gstreamer-plugins-base-uninstalled.pc.in +++ b/pkgconfig/gstreamer-plugins-base-uninstalled.pc.in @@ -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@ diff --git a/pkgconfig/gstreamer-plugins-base.pc.in b/pkgconfig/gstreamer-plugins-base.pc.in index a0f15be..89292ae 100644 --- a/pkgconfig/gstreamer-plugins-base.pc.in +++ b/pkgconfig/gstreamer-plugins-base.pc.in @@ -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@ diff --git a/pkgconfig/meson.build b/pkgconfig/meson.build index 9982703..bd54d01 100644 --- a/pkgconfig/meson.build +++ b/pkgconfig/meson.build @@ -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 -- 2.7.4