From 88975f224e34a56b2e9d08fd31b6218a1ef97c72 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 9 Aug 2017 12:26:43 +0300 Subject: [PATCH] examples/snapshot: Does not need GTK but only gdk-pixbuf --- configure.ac | 6 ++++++ tests/examples/meson.build | 1 + tests/examples/snapshot/Makefile.am | 10 +++++----- tests/examples/snapshot/meson.build | 4 ++-- tests/examples/snapshot/snapshot.c | 2 +- 5 files changed, 15 insertions(+), 8 deletions(-) diff --git a/configure.ac b/configure.ac index a45311e..abdb3e0 100644 --- a/configure.ac +++ b/configure.ac @@ -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 diff --git a/tests/examples/meson.build b/tests/examples/meson.build index 04e07d9..58a512d 100644 --- a/tests/examples/meson.build +++ b/tests/examples/meson.build @@ -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') diff --git a/tests/examples/snapshot/Makefile.am b/tests/examples/snapshot/Makefile.am index 16830ee..2e2e5cd 100644 --- a/tests/examples/snapshot/Makefile.am +++ b/tests/examples/snapshot/Makefile.am @@ -1,10 +1,10 @@ -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) diff --git a/tests/examples/snapshot/meson.build b/tests/examples/snapshot/meson.build index 296ca8f..61adb9f 100644 --- a/tests/examples/snapshot/meson.build +++ b/tests/examples/snapshot/meson.build @@ -1,7 +1,7 @@ -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 diff --git a/tests/examples/snapshot/snapshot.c b/tests/examples/snapshot/snapshot.c index 3ebdc15..e15c740 100644 --- a/tests/examples/snapshot/snapshot.c +++ b/tests/examples/snapshot/snapshot.c @@ -18,7 +18,7 @@ */ #include -#include +#include #include -- 2.7.4