Commit 88975f22 authored by Sebastian Dröge's avatar Sebastian Dröge 🍵

examples/snapshot: Does not need GTK but only gdk-pixbuf

parent 00fa39be
......@@ -298,6 +298,7 @@ AC_SUBST(GST_PREFIX)
dnl GTK is optional and only used in examples
HAVE_GTK=no
HAVE_GTK_X11=no
HAVE_GDK_PIXBUF=no
GTK_REQ=3.10
if test "x$BUILD_EXAMPLES" = "xyes"; then
PKG_CHECK_MODULES(GTK, gtk+-3.0 >= $GTK_REQ, HAVE_GTK=yes, HAVE_GTK=no)
......@@ -306,10 +307,15 @@ if test "x$BUILD_EXAMPLES" = "xyes"; then
PKG_CHECK_MODULES(GTK_QUARTZ, gtk+-quartz-3.0 >= $GTK_REQ, HAVE_GTK_QUARTZ=yes, HAVE_GTK_QUARTZ=no)
AC_SUBST(GTK_LIBS)
AC_SUBST(GTK_CFLAGS)
PKG_CHECK_MODULES(GDK_PIXBUF, gdk-pixbuf-2.0, HAVE_GDK_PIXBUF=yes, HAVE_GDK_PIXBUF=no)
AC_SUBST(GDK_PIXBUF_LIBS)
AC_SUBST(GDK_PIXBUF_CFLAGS)
fi
AM_CONDITIONAL(HAVE_GTK, test "x$HAVE_GTK" = "xyes")
AM_CONDITIONAL(HAVE_GTK_X11, test "x$HAVE_GTK_X11" = "xyes")
AM_CONDITIONAL(HAVE_GTK_QUARTZ, test "x$HAVE_GTK_QUARTZ" = "xyes")
AM_CONDITIONAL(HAVE_GDK_PIXBUF, test "x$HAVE_GDK_PIXBUF" = "xyes")
HAVE_QT=no
HAVE_QT_MOC=no
......
......@@ -2,6 +2,7 @@
gtk_dep = dependency('gtk+-3.0', version : '>= 3.10', required : false)
gtk_x11_dep = dependency('gtk+-x11-3.0', version : '>= 3.10', required : false)
gtk_quartz_dep = dependency('gtk+-quartz-3.0', version : '>= 3.10', required : false)
gdk_pixbuf_dep = dependency('gdk-pixbuf-2.0', required : false)
subdir('app')
subdir('audio')
......
if HAVE_GTK
GTK_EXAMPLES=snapshot
if HAVE_GDK_PIXBUF
GDK_PIXBUF_EXAMPLES=snapshot
endif
examples = $(GTK_EXAMPLES)
examples = $(GDK_PIXBUF_EXAMPLES)
noinst_PROGRAMS = $(examples)
LIBS = $(GST_LIBS) $(GTK_LIBS)
AM_CFLAGS = $(GST_CFLAGS) $(GTK_CFLAGS)
LIBS = $(GST_LIBS) $(GDK_PIXBUF_LIBS)
AM_CFLAGS = $(GST_CFLAGS) $(GDK_PIXBUF_CFLAGS)
if gtk_dep.found()
if gdk_pixbuf_dep.found()
executable('snapshot', 'snapshot.c',
c_args : gst_plugins_base_args,
include_directories: [configinc, libsinc],
dependencies : [libm, glib_deps, gst_dep, video_dep, gtk_dep],
dependencies : [libm, glib_deps, gst_dep, video_dep, gdk_pixbuf_dep],
install: false)
endif
......@@ -18,7 +18,7 @@
*/
#include <gst/gst.h>
#include <gtk/gtk.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <stdlib.h>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment