Fix introspection

Calling our get_type functions without prior gtk_init() is not ok,
and causes warnings now. Avoid that by teaching g-ir-scanner to
put a gtk_init() call into its generated code.
This commit is contained in:
Matthias Clasen 2015-08-29 03:11:01 -04:00
parent f44358b76a
commit 6838861d26

View File

@ -1366,7 +1366,7 @@ introspection_files += \
endif
include $(INTROSPECTION_MAKEFILE)
INTROSPECTION_SCANNER_ENV = CC="$(CC)"
INTROSPECTION_SCANNER_ENV = CC="$(CC)" CPPFLAGS="-I$(top_srcdir) -I$(top_builddir) -I. -include gtk.h"
INTROSPECTION_COMPILER_ARGS = \
--includedir=$(srcdir) \
--includedir=. \
@ -1376,6 +1376,7 @@ Gtk-3.0.gir: $(INTROSPECTION_SCANNER) libgtk-3.la $(top_builddir)/gdk/Gdk-3.0.gi
Gtk_3_0_gir_SCANNERFLAGS = \
--warn-all \
--add-include-path=$(top_builddir)/gdk \
--add-init-section="gtk_init (NULL, NULL);" \
--include-uninstalled=$(top_builddir)/gdk/Gdk-3.0.gir
Gtk_3_0_gir_INCLUDES = Atk-1.0
if USE_X11