mirror of
https://github.com/brl/mutter.git
synced 2024-11-12 17:27:03 -05:00
[build] Build Cogl introspection data
Currently, the introspection data for Cogl is built right into Clutter's own typelib. This makes functions like: cogl_path_round_rectangle() Appear as: Clutter.cogl_path_round_rectangle() It should be possible, instead, to have a Cogl namespace and: Cogl.path_round_rectangle() This means building introspection data for Cogl alone. Unfortunately, there are three types defined in Cogl that confuse the introspection scanner, and make it impossible to build a typelib: COGLint COGLuint COGLenum These three types should go away before 1.0, substituted by int, unsigned int and proper enumeration types. For this reason, we can just set up the GIR build and wait until the last moment to create the typelib. Once that has been done, we will be able to safely remove the Cogl API from the Clutter GIR and typelib and let people import Cogl if they want to use the Cogl API via introspection.
This commit is contained in:
parent
43fa38fcf5
commit
8ca46d728d
@ -20,3 +20,60 @@ pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = $(pc_files)
|
||||
|
||||
CLEANFILES = $(pc_files)
|
||||
|
||||
AM_CPPFLAGS = $(CLUTTER_CFLAGS) $(CLUTTER_DEBUG_CFLAGS) $(MAINTAINER_CFLAGS)
|
||||
|
||||
if HAVE_INTROSPECTION
|
||||
|
||||
cogl_headers = \
|
||||
$(top_srcdir)/clutter/cogl/cogl-bitmap.h \
|
||||
$(top_srcdir)/clutter/cogl/cogl-color.h \
|
||||
$(top_srcdir)/clutter/cogl/cogl-debug.h \
|
||||
$(top_srcdir)/clutter/cogl/cogl-fixed.h \
|
||||
$(top_srcdir)/clutter/cogl/cogl-material.h \
|
||||
$(top_srcdir)/clutter/cogl/cogl-matrix.h \
|
||||
$(top_srcdir)/clutter/cogl/cogl-offscreen.h \
|
||||
$(top_srcdir)/clutter/cogl/cogl-path.h \
|
||||
$(top_srcdir)/clutter/cogl/cogl-shader.h \
|
||||
$(top_srcdir)/clutter/cogl/cogl-texture.h \
|
||||
$(top_srcdir)/clutter/cogl/cogl-types.h \
|
||||
$(top_srcdir)/clutter/cogl/cogl-vertex-buffer.h
|
||||
|
||||
Cogl-@CLUTTER_API_VERSION@.gir: $(INTROSPECTION_SCANNER) $(CLUTTER_COGL)/libclutter-cogl.la
|
||||
$(QUIET_GEN)$(INTROSPECTION_SCANNER) -v \
|
||||
--namespace Cogl --nsversion=@CLUTTER_API_VERSION@ \
|
||||
-I$(top_srcdir)/clutter/cogl \
|
||||
-I$(top_srcdir)/clutter/cogl/common \
|
||||
-I$(top_srcdir)/clutter/cogl/@CLUTTER_COGL@ \
|
||||
-I$(top_builddir)/clutter \
|
||||
-DCLUTTER_COMPILATION \
|
||||
--include=GL-1.0 \
|
||||
--include=GObject-2.0 \
|
||||
--library=clutter-@CLUTTER_FLAVOUR@-@CLUTTER_API_VERSION@ \
|
||||
--libtool="$(top_builddir)/doltlibtool" \
|
||||
--pkg gobject-2.0 \
|
||||
--output $@ \
|
||||
$(top_builddir)/clutter/cogl/cogl-defines-@CLUTTER_COGL@.h \
|
||||
$(top_builddir)/clutter/cogl/cogl.h \
|
||||
$(cogl_headers)
|
||||
|
||||
BUILT_GIRSOURCES = Cogl-@CLUTTER_API_VERSION@.gir
|
||||
|
||||
girdir = $(datadir)/gir-1.0
|
||||
gir_DATA = $(BUILT_GIRSOURCES)
|
||||
|
||||
#typelibsdir = $(libdir)/girepository-1.0
|
||||
#typelibs_DATA = Cogl-@CLUTTER_API_VERSION@.typelib
|
||||
|
||||
#%.typelib: %.gir $(INTROSPECTION_COMPILER)
|
||||
# $(QUIET_GEN)$(DEBUG) $(INTROSPECTION_COMPILER) \
|
||||
# --includedir=$(top_builddir)/clutter \
|
||||
# --includedir=$(top_srcdir)/clutter \
|
||||
# --includedir=$(srcdir) \
|
||||
# --includedir=. \
|
||||
# $(INTROSPECTION_COMPILER_OPTS) \
|
||||
# $< -o $(@F)
|
||||
|
||||
CLEANFILES += $(BUILT_GIRSOURCES) #$(typelibs_DATA)
|
||||
|
||||
endif
|
||||
|
Loading…
Reference in New Issue
Block a user