[gstreamermm] Add the tests and examples directory to the build.



commit e6b961c62e331c84c235ec0692f9e4d8a28c213e
Author: José Alburquerque <jaalburqu svn gnome org>
Date:   Wed Sep 9 19:53:46 2009 -0400

    	Add the tests and examples directory to the build.
    
    	* Makefile.am (SUBDIRS): Add test and examples directories.
    	* configure.ac: Add an example section to add a dependency on
    	gtkmm-2.4 if the examples are built.
    	* gstreamer/gstreamermm/filelist.am: Beautify.

 ChangeLog                         |    9 +++++++++
 Makefile.am                       |    3 ++-
 configure.ac                      |   37 ++++++++++++++++++++++++++++++++++++-
 gstreamer/gstreamermm/filelist.am |   17 ++++++++++++++---
 4 files changed, 61 insertions(+), 5 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 2bbb18c..9eeeb89 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
 2009-09-09  José Alburquerque  <jaalburqu svn gnome org>
 
+	Add the tests and examples directory to the build.
+
+	* Makefile.am (SUBDIRS): Add test and examples directories.
+	* configure.ac: Add an example section to add a dependency on
+	gtkmm-2.4 if the examples are built.
+	* gstreamer/gstreamermm/filelist.am: Beautify.
+
+2009-09-09  José Alburquerque  <jaalburqu svn gnome org>
+
 	Add the plug-ins to the build.
 
 	* Makefile.am: Include tools directory in maintainer mode (typo).
diff --git a/Makefile.am b/Makefile.am
index dcc3f86..b48c03d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -26,7 +26,8 @@ doc_subdirs = doc
 else
 doc_subdirs =
 endif
-SUBDIRS = $(src_subdirs) gstreamer/gstreamermm $(doc_subdirs)
+SUBDIRS = $(src_subdirs) gstreamer/gstreamermm tests @EXAMPLE_SUBDIR@ \
+	  $(doc_subdirs)
 
 gstreamermm_includedir = $(includedir)/$(GSTREAMERMM_MODULE_NAME)
 gstreamermm_include_HEADERS = gstreamer/gstreamermm.h
diff --git a/configure.ac b/configure.ac
index 3ca4811..2964ccf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -82,6 +82,40 @@ MM_ARG_ENABLE_WARNINGS([GSTREAMERMM_WXXFLAGS],
                        [G GSTREAMER])
 
 #########################################################################
+#  Examples
+#########################################################################
+
+AC_ARG_ENABLE(examples,
+  [AC_HELP_STRING([--enable-examples],
+    [enable compilation of example programs [default=yes]])],
+  [enable_examples=$enableval], [enable_examples=yes])
+
+if test "x$enable_examples" = "xyes"; then
+
+# Extra dependencies needed for the examples. Use --enable-examples=no to build
+# the library without this.
+PKG_CHECK_MODULES(GSTREAMERMM_EXAMPLES, gtkmm-2.4 >= ${min_gtkmm_version})
+AC_SUBST(GSTREAMERMM_EXAMPLES_CFLAGS)
+AC_SUBST(GSTREAMERMM_EXAMPLES_LIBS)
+
+MM_ARG_WITH_TAGFILE_DOC([gtkmm-2.4.tag], [gtkmm-2.4])
+
+EXAMPLE_SUBDIR="examples"
+AC_CONFIG_FILES([
+    examples/Makefile
+    examples/optiongroup/Makefile
+    examples/element_link/Makefile
+    examples/ogg_player/Makefile
+    examples/ogg_player_gtkmm/Makefile
+    examples/media_player_gtkmm/Makefile
+    examples/typefind/Makefile
+    ])
+AC_SUBST(EXAMPLE_SUBDIR)
+else
+EXAMPLE_SUBDIR=""
+fi
+
+#########################################################################
 #  Plug-in definitions
 #########################################################################
 
@@ -159,7 +193,7 @@ xvimagesink=XvImageSink \
 
 AC_SUBST(GSTREAMERMM_PLUGIN_DEFS)
 
-##########################################################################
+#########################################################################
 
 AC_CONFIG_FILES([Makefile
                  tools/Makefile
@@ -168,6 +202,7 @@ AC_CONFIG_FILES([Makefile
                  gstreamer/${GSTREAMERMM_MODULE_NAME}-uninstalled.pc:gstreamer/gstreamermm-uninstalled.pc.in
                  gstreamer/src/Makefile
                  gstreamer/gstreamermm/Makefile
+                 tests/Makefile
                  doc/Makefile
                  doc/reference/Doxyfile])
 AC_OUTPUT
diff --git a/gstreamer/gstreamermm/filelist.am b/gstreamer/gstreamermm/filelist.am
index 8f07e3d..ca9812d 100644
--- a/gstreamer/gstreamermm/filelist.am
+++ b/gstreamer/gstreamermm/filelist.am
@@ -1,8 +1,19 @@
 ## Copyright 2009 The gstreamermm Development Team
 
-files_built_cc = $(files_hg:.hg=.cc)
+files_built_cc = $(files_hg:.hg=.cc) wrap_init.cc
 files_built_h  = $(files_hg:.hg=.h)
 files_built_ph = $(patsubst %.hg,private/%_p.h,$(files_hg))
-files_extra_cc = init.cc gst_wrap_init.cc miniobject.cc version.cc wrap.cc wrap_init.cc
-files_extra_h  = init.h gst_wrap_init.h miniobject.h version.h wrap.h wrap_init.h
+files_extra_cc =                \
+        init.cc                 \
+        gst_wrap_init.cc        \
+        miniobject.cc           \
+        version.cc              \
+        wrap.cc
+files_extra_h  =                \
+        init.h                  \
+        gst_wrap_init.h         \
+        miniobject.h            \
+        version.h               \
+        wrap.h                  \
+        wrap_init.h
 files_extra_ph = private/miniobject_p.h



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]