[nautilus] Added introspection to libnautilus-extension



commit 8d366402ca6120e6f75051596d8ae33589ef3591
Author: Rodrigo Moya <rodrigo gnome-db org>
Date:   Thu May 13 12:50:30 2010 +0200

    Added introspection to libnautilus-extension

 configure.in                      |    6 ++++++
 libnautilus-extension/Makefile.am |   34 ++++++++++++++++++++++++++++++++++
 2 files changed, 40 insertions(+), 0 deletions(-)
---
diff --git a/configure.in b/configure.in
index a0daebf..0004678 100644
--- a/configure.in
+++ b/configure.in
@@ -357,6 +357,11 @@ fi
 
 AM_GCONF_SOURCE_2
 
+##################################################
+# Check for introspection
+##################################################
+GOBJECT_INTROSPECTION_CHECK([0.6.4])
+
 dnl ==========================================================================
 
 AC_PATH_PROG(UPDATE_MIME_DATABASE, update-mime-database, no)
@@ -411,4 +416,5 @@ nautilus-$VERSION:
 
 	profiling support:      ${profiling_support}
 	nautilus-extension documentation: ${enable_gtk_doc}
+	nautilus-extension introspection: ${found_introspection}
 "
diff --git a/libnautilus-extension/Makefile.am b/libnautilus-extension/Makefile.am
index aba0ad0..a231583 100644
--- a/libnautilus-extension/Makefile.am
+++ b/libnautilus-extension/Makefile.am
@@ -55,3 +55,37 @@ pkgconfig_DATA=libnautilus-extension.pc
 EXTRA_DIST = \
 	libnautilus-extension.pc.in \
 	$(NULL)
+
+if HAVE_INTROSPECTION
+
+BUILT_SOURCES = Nautilus-2.0.gir Nautilus-2.0.typelib
+
+girdir = $(datadir)/gir-1.0
+gir_DATA = Nautilus-2.0.gir
+
+typelibsdir = $(libdir)/girepository-1.0/
+typelibs_DATA = Nautilus-2.0.typelib
+
+Nautilus-2.0.gir: libnautilus-extension.la
+	$(INTROSPECTION_SCANNER) -v \
+	--namespace Nautilus --nsversion=2.0 \
+	--add-include-path=$(srcdir) \
+	--add-include-path=. \
+	--include=Gio-2.0 \
+	--include=GLib-2.0 \
+	--library=nautilus-extension \
+	--pkg gio-2.0 \
+	--pkg glib-2.0 \
+	--output $@ \
+	-I$(top_srcdir) \
+	$(libnautilus_extension_include_HEADERS) \
+	$(libnautilus_extension_la_SOURCES)
+
+Nautilus-2.0.typelib: Nautilus-2.0.gir
+	LD_LIBRARY_PATH=.libs$${LD_LIBRARY_PATH:+:$$LD_LIBRARY_PATH} \
+	$(INTROSPECTION_COMPILER) \
+	--includedir=$(srcdir) \
+	--includedir=. \
+	$(INTROSPECTION_COMPILER_OPTS) $< -o $(@F)
+
+endif
\ No newline at end of file



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