[libgrss] Add basic support for GObject Introspection.
- From: Roberto Guido <rguido src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgrss] Add basic support for GObject Introspection.
- Date: Fri, 16 Aug 2013 01:51:59 +0000 (UTC)
commit 4c7232682e303c2fbb949724e5a4f98d90a7216d
Author: Simon Kågedal Reimer <skagedal gmail com>
Date: Mon Jul 8 21:08:09 2013 +0200
Add basic support for GObject Introspection.
Following instructions at:
https://wiki.gnome.org/GObjectIntrospection/AutotoolsIntegration
More work is needed: Many warnings are generated by g-ir-scanner, and
several methods are not introspected.
Signed-off-by: Roberto Guido <bob4job gmail com>
.gitignore | 2 ++
Makefile.am | 2 +-
configure.ac | 4 ++++
src/Makefile.am | 24 ++++++++++++++++++++++++
4 files changed, 31 insertions(+), 1 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 03effdc..be2d899 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,6 +5,8 @@
*.pc
*.stamp
*~
+*.gir
+*.typelib
.deps
.libs
Makefile
diff --git a/Makefile.am b/Makefile.am
index a13acf4..2558597 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -6,7 +6,7 @@ CLEANFILES = libgrss-$(LIBGRSS_API_VERSION).pc
pcfiledir = $(libdir)/pkgconfig
pcfile_DATA = libgrss-$(LIBGRSS_API_VERSION).pc
-DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc
+DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --enable-introspection
libgrss-$(LIBGRSS_API_VERSION).pc: libgrss.pc
@cp -f $< $@
diff --git a/configure.ac b/configure.ac
index 443140b..7708a45 100644
--- a/configure.ac
+++ b/configure.ac
@@ -93,6 +93,10 @@ GNOME_DOC_INIT
GTK_DOC_CHECK([1.10])
+dnl GObject Introspection
+
+GOBJECT_INTROSPECTION_CHECK([1.30.0])
+
AC_CONFIG_FILES([
Makefile
src/Makefile
diff --git a/src/Makefile.am b/src/Makefile.am
index 8e0bb5c..4af8606 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -96,3 +96,27 @@ BUILT_SOURCES = \
EXTRA_DIST = \
feed-marshal.list \
$(NULL)
+
+-include $(INTROSPECTION_MAKEFILE)
+INTROSPECTION_GIRS =
+INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir)
+INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir)
+
+if HAVE_INTROSPECTION
+introspection_sources = $(libgrss_0_5_la_SOURCES)
+
+Grss-0.5.gir: libgrss-0.5.la
+Grss_0_5_gir_INCLUDES = GObject-2.0
+Grss_0_5_gir_CFLAGS = $(INCLUDES)
+Grss_0_5_gir_LIBS = libgrss-0.5.la
+Grss_0_5_gir_FILES = $(introspection_sources)
+INTROSPECTION_GIRS += Grss-0.5.gir
+
+girdir = $(datadir)/gir-0.5
+gir_DATA = $(INTROSPECTION_GIRS)
+
+typelibdir = $(libdir)/girepository-0.5
+typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
+
+CLEANFILES += $(gir_DATA) $(typelib_DATA)
+endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]