summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorinfirit <[email protected]>2015-09-07 00:04:49 +0200
committerinfirit <[email protected]>2015-09-07 00:57:10 +0200
commitc8f01f720cfe1e048932ee912cb2039c85ab2622 (patch)
tree43e43d60d77ca304f79affe1d546850cbaf97982
parentcdad21434af7395ddba4b2c304e273925206cc38 (diff)
downloadlibmatekbd-c8f01f720cfe1e048932ee912cb2039c85ab2622.tar.bz2
libmatekbd-c8f01f720cfe1e048932ee912cb2039c85ab2622.tar.xz
Add gobject introspection
Based on libgnomekbd, commit: 0b2a10f764358fea0f2c078bba6f54eb188946c0 from: Sergey V. Udaltsov <[email protected]>
-rw-r--r--Makefile.am2
-rw-r--r--configure.ac3
-rw-r--r--libmatekbd/Makefile.am29
3 files changed, 33 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am
index ae15bac..545a3d9 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -6,6 +6,8 @@ SUBDIRS = libmatekbd $(TEST) po
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
+DISTCHECK_CONFIGURE_FLAGS = --enable-introspection
+
DISTCLEANFILES = \
intltool-extract \
intltool-merge \
diff --git a/configure.ac b/configure.ac
index 24c96eb..98ce338 100644
--- a/configure.ac
+++ b/configure.ac
@@ -40,6 +40,7 @@ case "$with_gtk" in
GDK_REQUIRED=3.0
;;
esac
+AC_SUBST([GTK_API_VERSION])
dnl ***************************************************************************
dnl *** Minimum library versions for libmatekbd ***
@@ -124,6 +125,8 @@ AM_CONDITIONAL(BUILD_TESTS, test "$enable_tests" = "yes")
AC_SEARCH_LIBS([sqrt], [m])
+GOBJECT_INTROSPECTION_CHECK([0.6.7])
+
AC_OUTPUT([
Makefile
libmatekbd.pc
diff --git a/libmatekbd/Makefile.am b/libmatekbd/Makefile.am
index a6a0a06..b071c16 100644
--- a/libmatekbd/Makefile.am
+++ b/libmatekbd/Makefile.am
@@ -4,7 +4,7 @@ uidir = $(pkgdatadir)/ui
ui_DATA = show-layout.ui
common_CFLAGS = \
- -I$(top_srcdir) -Wall \
+ -I$(top_srcdir) \
$(GDK_CFLAGS) \
$(GIO_CFLAGS) \
$(LIBXKLAVIER_CFLAGS) \
@@ -109,3 +109,30 @@ matekbd-keyboard-drawing-marshal.c: matekbd-keyboard-drawing-marshal.h
--body > matekbd-keyboard-drawing-marshal.tmp \
&& mv matekbd-keyboard-drawing-marshal.tmp matekbd-keyboard-drawing-marshal.c ) \
|| ( rm -f matekbd-keyboard-drawing-marshal.tmp && exit 1 )
+
+
+-include $(INTROSPECTION_MAKEFILE)
+INTROSPECTION_GIRS =
+INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir) --warn-all
+INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir)
+
+if HAVE_INTROSPECTION
+introspection_sources = $(matekbdinc_HEADERS) \
+ $(libmatekbd_la_SOURCES) \
+ $(libmatekbdui_la_SOURCES)
+
+Matekbd-1.0.gir: libmatekbd.la libmatekbdui.la
+Matekbd_1_0_gir_INCLUDES = GObject-2.0 Gtk-$(GTK_API_VERSION) xlib-2.0
+Matekbd_1_0_gir_CFLAGS = $(libmatekbdui_la_CFLAGS)
+Matekbd_1_0_gir_LIBS = libmatekbd.la libmatekbdui.la
+Matekbd_1_0_gir_FILES = $(introspection_sources)
+INTROSPECTION_GIRS += Matekbd-1.0.gir
+
+girdir = $(datadir)/gir-1.0
+gir_DATA = $(INTROSPECTION_GIRS)
+
+typelibdir = $(libdir)/girepository-1.0
+typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
+
+CLEANFILES = $(gir_DATA) $(typelib_DATA)
+endif