]> saetta.ns0.it Git - zakform/gtk/commitdiff
Enabled gir.
authorAndrea Zagli <azagli@libero.it>
Sun, 11 Jun 2017 07:31:37 +0000 (09:31 +0200)
committerAndrea Zagli <azagli@libero.it>
Sun, 11 Jun 2017 07:31:37 +0000 (09:31 +0200)
.gitignore
Makefile.am
configure.ac
src/Makefile.am
src/formelement.c
src/formelement.h

index 8129d065c7f857c37bb7f0e653878e9baf5e5522..7f925fa8f87a4ed5ae6bf5898e94a918366d9671 100644 (file)
@@ -50,3 +50,5 @@ intltool-*
 Rules-quot
 *.exe
 *.csv
+*.gir
+*.typelib
\ No newline at end of file
index b10e3bf286544f2de3cc42ffa474de90f83b296b..5e943c525b2bec302a23f88a17efc7d1555cfd4b 100644 (file)
@@ -1,3 +1,5 @@
+DISTCHECK_CONFIGURE_FLAGS = --enable-introspection
+
 SUBDIRS = src tests
 
 ACLOCAL_AMFLAGS = -I m4
index c875c6cc9ed5a44844d4a319b8639ac671267cd2..43331d80008f1e7dd83b9caa3b997f82500009b7 100644 (file)
@@ -29,6 +29,8 @@ AC_PROG_MAKE_SET
 AC_PROG_LIBTOOL
 AC_PROG_RANLIB
 
+GOBJECT_INTROSPECTION_CHECK([1.30.0])
+
 dnl ******************************
 dnl Translations
 dnl ******************************
index b8fae43830753842510b4150cdca2695ee0ca8c4..d5a6e19d34b5b019edd42e8812988efffa69f6de 100644 (file)
@@ -29,8 +29,7 @@ libzakformgtk_la_SOURCES = \
 
 libzakformgtk_la_LDFLAGS = -no-undefined
 
-libzakformgtk_include_HEADERS = \
-                             libzakformgtk.h \
+gir_include = \
                              form.h \
                              formelement.h \
                              formelementcheck.h \
@@ -41,6 +40,10 @@ libzakformgtk_include_HEADERS = \
                              formelementspin.h \
                              formelementtextview.h
 
+libzakformgtk_include_HEADERS = \
+                             libzakformgtk.h \
+                             $(git_include)
+
 libzakformgtk_includedir = $(includedir)/libzakformgtk
 
 install-exec-hook:
@@ -49,3 +52,29 @@ install-exec-hook:
 
 uninstall-hook:
        rm -f $(libzakformmodulesdir)/libzakformgtk$(libmodulesext)
+
+CLEANFILES =
+
+-include $(INTROSPECTION_MAKEFILE)
+INTROSPECTION_GIRS =
+INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir) --warn-all
+INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir)
+
+if HAVE_INTROSPECTION
+introspection_sources = $(libzakformgtk_la_SOURCES) $(gir_include)
+
+ZakFormGtk-1.0.gir: libzakformgtk.la
+ZakFormGtk_1_0_gir_INCLUDES = Gtk-3.0 ZakForm-1.0
+ZakFormGtk_1_0_gir_CFLAGS = $(AM_CPPFLAGS)
+ZakFormGtk_1_0_gir_LIBS = libzakformgtk.la
+ZakFormGtk_1_0_gir_FILES = $(introspection_sources)
+INTROSPECTION_GIRS += ZakFormGtk-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
index 4cde39f1c3b7f54bc89f3fd1c66941f33dc1ddb3..6897cc2b9c1c575c79c949f69a6975588cc152e3 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2015 Andrea Zagli <azagli@libero.it>
+ * Copyright (C) 2015-2017 Andrea Zagli <azagli@libero.it>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -20,6 +20,8 @@
        #include <config.h>
 #endif
 
+#include <glib/gi18n-lib.h>
+
 #include "formelement.h"
 
 enum
index 91a71cba7b360d9700e93021ae4456e6a6988d53..4440288a6b359200f9fc28e9513328b2d9c8a99a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2015 Andrea Zagli <azagli@libero.it>
+ * Copyright (C) 2015-2017 Andrea Zagli <azagli@libero.it>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -21,7 +21,6 @@
 
 
 #include <glib-object.h>
-#include <glib/gi18n-lib.h>
 
 #include <gtk/gtk.h>