gl/pkg-config: add the configured platform/api/winsys
authorMatthew Waters <matthew@centricular.com>
Thu, 17 Nov 2016 06:15:55 +0000 (17:15 +1100)
committerMatthew Waters <matthew@centricular.com>
Tue, 10 Jan 2017 02:57:37 +0000 (13:57 +1100)
Allows users to query this from pkg-config instead of requiring them to
compile mini programs checking defines in gstglconfig.h

configure.ac
pkgconfig/gstreamer-gl-uninstalled.pc.in
pkgconfig/gstreamer-gl.pc.in
pkgconfig/meson.build

index 03a785b..c96a896 100644 (file)
@@ -1300,6 +1300,9 @@ if test "x$GL_APIS" = "x" -o "x$GL_PLATFORMS" = "x" -o "x$GL_WINDOWS" = "x"; the
   HAVE_WINDOW_EAGL=no
 fi
 
+AC_SUBST(GL_APIS)
+AC_SUBST(GL_PLATFORMS)
+AC_SUBST(GL_WINDOWS)
 AC_SUBST(GL_LIBS)
 AC_SUBST(GL_CFLAGS)
 AC_SUBST(GL_OBJCFLAGS)
index a21ac46..b4ae6d3 100644 (file)
@@ -4,6 +4,9 @@ libdir=@gllibdir@
 includedir=@abs_top_builddir@/gst-libs
 girdir=@abs_top_builddir@/gst-libs/gst/base
 typelibdir=@abs_top_builddir@/gst-libs/gst/base
+gl_platforms=@GL_PLATFORMS@
+gl_winsys=@GL_WINDOWS@
+gl_apis=@GL_APIS@
 
 Name: GStreamer OpenGL Plugins Libraries, Uninstalled
 Description: Streaming media framework, OpenGL plugins libraries, uninstalled
index a3a9dc6..8e7a303 100644 (file)
@@ -3,6 +3,9 @@ exec_prefix=@exec_prefix@
 libdir=@libdir@
 includedir=@includedir@/gstreamer-@GST_API_VERSION@
 pluginsdir=@libdir@/gstreamer-@GST_API_VERSION@
+gl_platforms=@GL_PLATFORMS@
+gl_winsys=@GL_WINDOWS@
+gl_apis=@GL_APIS@
 
 Name: GStreamer OpenGL Plugins Libraries
 Description: Streaming media framework, OpenGL plugins libraries
index b6715cd..b2deeac 100644 (file)
@@ -37,6 +37,9 @@ pkg_libs = [
 if build_gstgl
   pkgconf.set('gllibdir', join_paths(meson.build_root(), gstgl.outdir()))
   pkg_libs += '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))
 endif
 
 if use_wayland