mirror of
https://github.com/brl/mutter.git
synced 2024-12-24 12:02:04 +00:00
Adds a --with-system-cogl config option for Clutter
This makes it possible to build Clutter against a standalone build of Cogl instead of having the Clutter build traverse into the clutter/cogl subdirectory.
This commit is contained in:
parent
31da46c799
commit
70767f08dc
@ -4,7 +4,9 @@ include $(top_srcdir)/build/autotools/Makefile.am.silent
|
|||||||
NULL =
|
NULL =
|
||||||
|
|
||||||
# we recurse only into Cogl
|
# we recurse only into Cogl
|
||||||
|
if !USE_SYSTEM_COGL
|
||||||
SUBDIRS = cogl
|
SUBDIRS = cogl
|
||||||
|
endif
|
||||||
|
|
||||||
# common definitions
|
# common definitions
|
||||||
CLEANFILES =
|
CLEANFILES =
|
||||||
@ -17,16 +19,21 @@ lib_LTLIBRARIES =
|
|||||||
INCLUDES = \
|
INCLUDES = \
|
||||||
-I$(top_srcdir) \
|
-I$(top_srcdir) \
|
||||||
-I$(top_srcdir)/clutter \
|
-I$(top_srcdir)/clutter \
|
||||||
-I$(top_srcdir)/clutter/cogl \
|
|
||||||
-I$(top_srcdir)/clutter/cogl/pango \
|
|
||||||
-I$(top_srcdir)/clutter/$(CLUTTER_WINSYS) \
|
-I$(top_srcdir)/clutter/$(CLUTTER_WINSYS) \
|
||||||
-I$(top_srcdir)/clutter/$(CLUTTER_WINSYS_BASE) \
|
-I$(top_srcdir)/clutter/$(CLUTTER_WINSYS_BASE) \
|
||||||
-I$(top_srcdir)/clutter/cally \
|
-I$(top_srcdir)/clutter/cally \
|
||||||
-I$(top_srcdir)/clutter/evdev \
|
-I$(top_srcdir)/clutter/evdev \
|
||||||
-I$(top_builddir) \
|
-I$(top_builddir) \
|
||||||
-I$(top_builddir)/clutter \
|
-I$(top_builddir)/clutter \
|
||||||
|
$(NULL)
|
||||||
|
|
||||||
|
if !USE_SYSTEM_COGL
|
||||||
|
INCLUDES += \
|
||||||
|
-I$(top_srcdir)/clutter/cogl \
|
||||||
|
-I$(top_srcdir)/clutter/cogl/pango \
|
||||||
-I$(top_builddir)/clutter/cogl \
|
-I$(top_builddir)/clutter/cogl \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
endif
|
||||||
|
|
||||||
AM_CPPFLAGS = \
|
AM_CPPFLAGS = \
|
||||||
-DCLUTTER_PREFIX=\""$(prefix)"\" \
|
-DCLUTTER_PREFIX=\""$(prefix)"\" \
|
||||||
@ -646,15 +653,20 @@ lib_LTLIBRARIES += libclutter-@CLUTTER_SONAME_INFIX@-@CLUTTER_API_VERSION@.la
|
|||||||
|
|
||||||
libclutter_@CLUTTER_SONAME_INFIX@_@CLUTTER_API_VERSION@_la_LIBADD = \
|
libclutter_@CLUTTER_SONAME_INFIX@_@CLUTTER_API_VERSION@_la_LIBADD = \
|
||||||
$(CLUTTER_LIBS) \
|
$(CLUTTER_LIBS) \
|
||||||
$(CLUTTER_PROFILE_LIBS) \
|
$(CLUTTER_PROFILE_LIBS)
|
||||||
$(top_builddir)/clutter/cogl/cogl/libcogl.la \
|
|
||||||
$(top_builddir)/clutter/cogl/pango/libcoglpango.la
|
|
||||||
|
|
||||||
libclutter_@CLUTTER_SONAME_INFIX@_@CLUTTER_API_VERSION@_la_DEPENDENCIES = \
|
libclutter_@CLUTTER_SONAME_INFIX@_@CLUTTER_API_VERSION@_la_DEPENDENCIES = \
|
||||||
$(top_builddir)/clutter/cogl/cogl/libcogl.la \
|
|
||||||
$(top_builddir)/clutter/cogl/pango/libcoglpango.la \
|
|
||||||
$(win32_resources)
|
$(win32_resources)
|
||||||
|
|
||||||
|
if !USE_SYSTEM_COGL
|
||||||
|
libclutter_@CLUTTER_SONAME_INFIX@_@CLUTTER_API_VERSION@_la_LIBADD += \
|
||||||
|
$(top_builddir)/clutter/cogl/cogl/libcogl.la \
|
||||||
|
$(top_builddir)/clutter/cogl/pango/libcoglpango.la
|
||||||
|
libclutter_@CLUTTER_SONAME_INFIX@_@CLUTTER_API_VERSION@_la_DEPENDENCIES += \
|
||||||
|
$(top_builddir)/clutter/cogl/cogl/libcogl.la \
|
||||||
|
$(top_builddir)/clutter/cogl/pango/libcoglpango.la
|
||||||
|
endif
|
||||||
|
|
||||||
libclutter_@CLUTTER_SONAME_INFIX@_@CLUTTER_API_VERSION@_la_SOURCES = \
|
libclutter_@CLUTTER_SONAME_INFIX@_@CLUTTER_API_VERSION@_la_SOURCES = \
|
||||||
$(backend_source_c) \
|
$(backend_source_c) \
|
||||||
$(backend_source_h) \
|
$(backend_source_h) \
|
||||||
@ -701,9 +713,19 @@ Clutter_@CLUTTER_API_VERSION_AM@_gir_INCLUDES = GL-1.0 GObject-2.0 cairo-1.0 Atk
|
|||||||
Clutter_@CLUTTER_API_VERSION_AM@_gir_SCANNERFLAGS = \
|
Clutter_@CLUTTER_API_VERSION_AM@_gir_SCANNERFLAGS = \
|
||||||
--warn-all \
|
--warn-all \
|
||||||
--c-include='clutter/clutter.h' \
|
--c-include='clutter/clutter.h' \
|
||||||
--pkg-export=clutter-@CLUTTER_API_VERSION@ \
|
--pkg-export=clutter-@CLUTTER_API_VERSION@
|
||||||
|
if USE_SYSTEM_COGL
|
||||||
|
Clutter_@CLUTTER_API_VERSION_AM@_gir_INCLUDES += Cogl-1.0
|
||||||
|
else
|
||||||
|
Clutter_@CLUTTER_API_VERSION_AM@_gir_LIBS += \
|
||||||
|
$(top_builddir)/clutter/cogl/cogl/libcogl.la \
|
||||||
|
$(top_builddir)/clutter/cogl/pango/libcoglpango.la
|
||||||
|
Clutter_@CLUTTER_API_VERSION_AM@_gir_SCANNERFLAGS += \
|
||||||
--include-uninstalled=$(top_builddir)/clutter/cogl/cogl/Cogl-1.0.gir
|
--include-uninstalled=$(top_builddir)/clutter/cogl/cogl/Cogl-1.0.gir
|
||||||
|
COGL_GIR_DEP=Cogl-1.0.gir
|
||||||
|
endif
|
||||||
|
|
||||||
|
if !USE_SYSTEM_COGL
|
||||||
# Cogl.gir is used included into Clutter.gir, so it needs to be built
|
# Cogl.gir is used included into Clutter.gir, so it needs to be built
|
||||||
# before the typelib is generated
|
# before the typelib is generated
|
||||||
Clutter-@CLUTTER_API_VERSION@.typelib: Cogl-1.0.gir
|
Clutter-@CLUTTER_API_VERSION@.typelib: Cogl-1.0.gir
|
||||||
@ -716,11 +738,12 @@ Clutter-@CLUTTER_API_VERSION@.typelib: Cogl-1.0.gir
|
|||||||
Cogl-1.0.gir: Makefile Clutter-@CLUTTER_API_VERSION@.gir cogl/cogl/Cogl-1.0.gir
|
Cogl-1.0.gir: Makefile Clutter-@CLUTTER_API_VERSION@.gir cogl/cogl/Cogl-1.0.gir
|
||||||
$(QUIET_GEN) \
|
$(QUIET_GEN) \
|
||||||
shlib=`sed -n 's/.*shared-library="\([^"]*\)".*/\1/p' < Clutter-@CLUTTER_API_VERSION@.gir` ; \
|
shlib=`sed -n 's/.*shared-library="\([^"]*\)".*/\1/p' < Clutter-@CLUTTER_API_VERSION@.gir` ; \
|
||||||
sed "s/shared-library=\"[^\"]*\"/shared-library=\"$$shlib\"/"< cogl/cogl/Cogl-1.0.gir > $@
|
sed "s/shared-library=\"[^\"]*\"/shared-library=\"$$shlib\"/"< $(top_builddir)/clutter/cogl/cogl/Cogl-1.0.gir > $@
|
||||||
|
|
||||||
BUILT_GIRSOURCES += Cogl-1.0.gir
|
BUILT_GIRSOURCES += Cogl-1.0.gir
|
||||||
|
endif
|
||||||
|
|
||||||
Cally-@CLUTTER_API_VERSION@.gir: Makefile Clutter-@CLUTTER_API_VERSION@.gir Cogl-1.0.gir
|
Cally-@CLUTTER_API_VERSION@.gir: Makefile Clutter-@CLUTTER_API_VERSION@.gir $(COGL_GIR_DEP)
|
||||||
|
|
||||||
Cally_@CLUTTER_API_VERSION_AM@_gir_NAMESPACE = Cally
|
Cally_@CLUTTER_API_VERSION_AM@_gir_NAMESPACE = Cally
|
||||||
Cally_@CLUTTER_API_VERSION_AM@_gir_VERSION = @CLUTTER_API_VERSION@
|
Cally_@CLUTTER_API_VERSION_AM@_gir_VERSION = @CLUTTER_API_VERSION@
|
||||||
@ -731,27 +754,52 @@ Cally_@CLUTTER_API_VERSION_AM@_gir_SCANNERFLAGS = \
|
|||||||
--identifier-prefix=Cally \
|
--identifier-prefix=Cally \
|
||||||
--symbol-prefix=cally \
|
--symbol-prefix=cally \
|
||||||
--c-include='cally/cally.h' \
|
--c-include='cally/cally.h' \
|
||||||
--pkg-export=cally-@CLUTTER_API_VERSION@ \
|
--pkg-export=cally-@CLUTTER_API_VERSION@
|
||||||
|
# Note: it's important to pass --include-uninstalled for the Cogl-1.0.gir
|
||||||
|
# before the Clutter gir otherwise g-ir-scanner can get upset as it
|
||||||
|
# immediatly scans the Clutter gir file and may fail to find a Cogl-1.0.gir
|
||||||
|
if USE_SYSTEM_COGL
|
||||||
|
Cally_@CLUTTER_API_VERSION_AM@_gir_SCANNERFLAGS += \
|
||||||
|
--include-uninstalled=$(top_builddir)/clutter/Clutter-@CLUTTER_API_VERSION@.gir
|
||||||
|
else
|
||||||
|
Cally_@CLUTTER_API_VERSION_AM@_gir_LIBS += \
|
||||||
|
$(top_builddir)/clutter/cogl/cogl/libcogl.la \
|
||||||
|
$(top_builddir)/clutter/cogl/pango/libcoglpango.la
|
||||||
|
Cally_@CLUTTER_API_VERSION_AM@_gir_SCANNERFLAGS += \
|
||||||
--include-uninstalled=$(top_builddir)/clutter/Cogl-1.0.gir \
|
--include-uninstalled=$(top_builddir)/clutter/Cogl-1.0.gir \
|
||||||
--include-uninstalled=$(top_builddir)/clutter/Clutter-@CLUTTER_API_VERSION@.gir
|
--include-uninstalled=$(top_builddir)/clutter/Clutter-@CLUTTER_API_VERSION@.gir
|
||||||
|
endif
|
||||||
|
|
||||||
INTROSPECTION_GIRS += Cally-@CLUTTER_API_VERSION@.gir
|
INTROSPECTION_GIRS += Cally-@CLUTTER_API_VERSION@.gir
|
||||||
|
|
||||||
if SUPPORT_X11
|
if SUPPORT_X11
|
||||||
ClutterX11-@CLUTTER_API_VERSION@.gir: Makefile Clutter-@CLUTTER_API_VERSION@.gir Cogl-1.0.gir
|
ClutterX11-@CLUTTER_API_VERSION@.gir: Makefile Clutter-@CLUTTER_API_VERSION@.gir $(COGL_GIR_DEP)
|
||||||
|
|
||||||
ClutterX11_@CLUTTER_API_VERSION_AM@_gir_SCANNERFLAGS = \
|
ClutterX11_@CLUTTER_API_VERSION_AM@_gir_SCANNERFLAGS = \
|
||||||
--identifier-prefix=ClutterX11 \
|
--identifier-prefix=ClutterX11 \
|
||||||
--symbol-prefix=clutter_x11 \
|
--symbol-prefix=clutter_x11 \
|
||||||
--c-include='clutter/x11/clutter-x11.h' \
|
--c-include='clutter/x11/clutter-x11.h' \
|
||||||
--pkg-export=clutter-x11-@CLUTTER_API_VERSION@ \
|
--pkg-export=clutter-x11-@CLUTTER_API_VERSION@
|
||||||
--include-uninstalled=$(top_builddir)/clutter/Cogl-1.0.gir \
|
|
||||||
--include-uninstalled=$(top_builddir)/clutter/Clutter-@CLUTTER_API_VERSION@.gir
|
|
||||||
ClutterX11_@CLUTTER_API_VERSION_AM@_gir_INCLUDES = xlib-2.0
|
ClutterX11_@CLUTTER_API_VERSION_AM@_gir_INCLUDES = xlib-2.0
|
||||||
ClutterX11_@CLUTTER_API_VERSION_AM@_gir_LIBS = libclutter-@CLUTTER_SONAME_INFIX@-@CLUTTER_API_VERSION@.la
|
ClutterX11_@CLUTTER_API_VERSION_AM@_gir_LIBS = libclutter-@CLUTTER_SONAME_INFIX@-@CLUTTER_API_VERSION@.la
|
||||||
ClutterX11_@CLUTTER_API_VERSION_AM@_gir_FILES = $(x11_introspection)
|
ClutterX11_@CLUTTER_API_VERSION_AM@_gir_FILES = $(x11_introspection)
|
||||||
ClutterX11_@CLUTTER_API_VERSION_AM@_gir_CFLAGS = $(INCLUDES) $(CLUTTER_CFLAGS) $(AM_CPPFLAGS) -UCLUTTER_DISABLE_DEPRECATED
|
ClutterX11_@CLUTTER_API_VERSION_AM@_gir_CFLAGS = $(INCLUDES) $(CLUTTER_CFLAGS) $(AM_CPPFLAGS) -UCLUTTER_DISABLE_DEPRECATED
|
||||||
|
|
||||||
|
# Note: it's important to pass --include-uninstalled for the Cogl-1.0.gir
|
||||||
|
# before the Clutter gir otherwise g-ir-scanner can get upset as it
|
||||||
|
# immediatly scans the Clutter gir file and may fail to find a Cogl-1.0.gir
|
||||||
|
if USE_SYSTEM_COGL
|
||||||
|
ClutterX11_@CLUTTER_API_VERSION_AM@_gir_SCANNERFLAGS += \
|
||||||
|
--include-uninstalled=$(top_builddir)/clutter/Clutter-@CLUTTER_API_VERSION@.gir
|
||||||
|
else
|
||||||
|
ClutterX11_@CLUTTER_API_VERSION_AM@_gir_SCANNERFLAGS += \
|
||||||
|
--include-uninstalled=$(top_builddir)/clutter/Cogl-1.0.gir \
|
||||||
|
--include-uninstalled=$(top_builddir)/clutter/Clutter-@CLUTTER_API_VERSION@.gir
|
||||||
|
ClutterX11_@CLUTTER_API_VERSION_AM@_gir_LIBS += \
|
||||||
|
$(top_builddir)/clutter/cogl/cogl/libcogl.la \
|
||||||
|
$(top_builddir)/clutter/cogl/pango/libcoglpango.la
|
||||||
|
endif
|
||||||
|
|
||||||
INTROSPECTION_GIRS += ClutterX11-@CLUTTER_API_VERSION@.gir
|
INTROSPECTION_GIRS += ClutterX11-@CLUTTER_API_VERSION@.gir
|
||||||
endif # SUPPORT_X11
|
endif # SUPPORT_X11
|
||||||
|
|
||||||
|
@ -53,7 +53,6 @@
|
|||||||
#include "clutter-version.h"
|
#include "clutter-version.h"
|
||||||
|
|
||||||
#include <cogl/cogl.h>
|
#include <cogl/cogl.h>
|
||||||
#include <cogl/cogl-internal.h>
|
|
||||||
|
|
||||||
G_DEFINE_ABSTRACT_TYPE (ClutterBackend, clutter_backend, G_TYPE_OBJECT);
|
G_DEFINE_ABSTRACT_TYPE (ClutterBackend, clutter_backend, G_TYPE_OBJECT);
|
||||||
|
|
||||||
|
@ -109,8 +109,13 @@
|
|||||||
#include "clutter-stage-private.h"
|
#include "clutter-stage-private.h"
|
||||||
#include "clutter-version.h" /* For flavour define */
|
#include "clutter-version.h" /* For flavour define */
|
||||||
|
|
||||||
#include "cogl/cogl.h"
|
#include <cogl/cogl.h>
|
||||||
|
|
||||||
|
#ifdef CLUTTER_USING_SYSTEM_COGL
|
||||||
|
#include <cogl/cogl-pango.h>
|
||||||
|
#else
|
||||||
#include "pango/cogl-pango.h"
|
#include "pango/cogl-pango.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "cally.h" /* For accessibility support */
|
#include "cally.h" /* For accessibility support */
|
||||||
|
|
||||||
|
@ -30,7 +30,11 @@
|
|||||||
|
|
||||||
#include <glib/gi18n-lib.h>
|
#include <glib/gi18n-lib.h>
|
||||||
|
|
||||||
|
#ifdef CLUTTER_USING_SYSTEM_COGL
|
||||||
|
#include <cogl/cogl-pango.h>
|
||||||
|
#else
|
||||||
#include "pango/cogl-pango.h"
|
#include "pango/cogl-pango.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "clutter-backend.h"
|
#include "clutter-backend.h"
|
||||||
#include "clutter-effect.h"
|
#include "clutter-effect.h"
|
||||||
|
@ -48,8 +48,7 @@
|
|||||||
#include "clutter-private.h"
|
#include "clutter-private.h"
|
||||||
#include "clutter-stage-private.h"
|
#include "clutter-stage-private.h"
|
||||||
|
|
||||||
#include "cogl/cogl.h"
|
#include <cogl/cogl.h>
|
||||||
#include "cogl/cogl-internal.h"
|
|
||||||
|
|
||||||
#define clutter_backend_glx_get_type _clutter_backend_glx_get_type
|
#define clutter_backend_glx_get_type _clutter_backend_glx_get_type
|
||||||
|
|
||||||
|
@ -52,7 +52,12 @@
|
|||||||
#include <GL/glx.h>
|
#include <GL/glx.h>
|
||||||
|
|
||||||
#include "x11/clutter-x11-texture-pixmap.h"
|
#include "x11/clutter-x11-texture-pixmap.h"
|
||||||
|
|
||||||
|
#ifdef CLUTTER_USING_SYSTEM_COGL
|
||||||
|
#include <cogl/cogl-texture-pixmap-x11.h>
|
||||||
|
#else
|
||||||
#include "cogl/winsys/cogl-texture-pixmap-x11.h"
|
#include "cogl/winsys/cogl-texture-pixmap-x11.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
G_DEFINE_TYPE (ClutterGLXTexturePixmap, \
|
G_DEFINE_TYPE (ClutterGLXTexturePixmap, \
|
||||||
clutter_glx_texture_pixmap, \
|
clutter_glx_texture_pixmap, \
|
||||||
|
@ -58,8 +58,7 @@
|
|||||||
#include <X11/extensions/XInput2.h>
|
#include <X11/extensions/XInput2.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "cogl/cogl.h"
|
#include <cogl/cogl.h>
|
||||||
#include "cogl/cogl-internal.h"
|
|
||||||
|
|
||||||
#include "clutter-backend.h"
|
#include "clutter-backend.h"
|
||||||
#include "clutter-debug.h"
|
#include "clutter-debug.h"
|
||||||
|
@ -52,7 +52,12 @@
|
|||||||
#include "clutter-private.h"
|
#include "clutter-private.h"
|
||||||
|
|
||||||
#include "cogl/cogl.h"
|
#include "cogl/cogl.h"
|
||||||
|
|
||||||
|
#ifdef CLUTTER_USING_SYSTEM_COGL
|
||||||
|
#include <cogl/cogl-texture-pixmap-x11.h>
|
||||||
|
#else
|
||||||
#include "cogl/winsys/cogl-texture-pixmap-x11.h"
|
#include "cogl/winsys/cogl-texture-pixmap-x11.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <X11/extensions/Xdamage.h>
|
#include <X11/extensions/Xdamage.h>
|
||||||
|
|
||||||
|
17
configure.ac
17
configure.ac
@ -206,8 +206,23 @@ AC_ARG_WITH([gles],
|
|||||||
[Select Clutter GLES version (for EGL backends)])],
|
[Select Clutter GLES version (for EGL backends)])],
|
||||||
[glesversion=$with_gles])
|
[glesversion=$with_gles])
|
||||||
|
|
||||||
|
COGL_REQ=""
|
||||||
|
AC_ARG_WITH([system-cogl],
|
||||||
|
[AS_HELP_STRING([--with-system-cogl=@<:@yes/no@:>@],
|
||||||
|
[Use a system installed Cogl library])],
|
||||||
|
[
|
||||||
|
if test "x$with_system_cogl" = "xyes"; then
|
||||||
|
COGL_REQ="cogl-1.0"
|
||||||
|
fi
|
||||||
|
],
|
||||||
|
[with_system_cogl=no])
|
||||||
|
|
||||||
|
AM_CONDITIONAL(USE_SYSTEM_COGL, [test "x$with_system_cogl" = "xyes"])
|
||||||
|
AS_IF([test "x$with_system_cogl" = "xyes"],
|
||||||
|
[ AC_DEFINE([CLUTTER_USING_SYSTEM_COGL], [1], [Built against the system Cogl library])])
|
||||||
|
|
||||||
# base dependencies for core
|
# base dependencies for core
|
||||||
CLUTTER_BASE_PC_FILES="cairo-gobject >= $CAIRO_REQ_VERSION atk >= $ATK_REQ_VERSION pangocairo >= $PANGO_REQ_VERSION json-glib-1.0 >= $JSON_GLIB_REQ_VERSION"
|
CLUTTER_BASE_PC_FILES="cairo-gobject >= $CAIRO_REQ_VERSION atk >= $ATK_REQ_VERSION pangocairo >= $PANGO_REQ_VERSION json-glib-1.0 >= $JSON_GLIB_REQ_VERSION $COGL_REQ"
|
||||||
|
|
||||||
# backend specific pkg-config files
|
# backend specific pkg-config files
|
||||||
BACKEND_PC_FILES=""
|
BACKEND_PC_FILES=""
|
||||||
|
@ -109,7 +109,6 @@ INCLUDES = \
|
|||||||
|
|
||||||
common_ldadd = $(top_builddir)/clutter/libclutter-@CLUTTER_SONAME_INFIX@-@CLUTTER_API_VERSION@.la
|
common_ldadd = $(top_builddir)/clutter/libclutter-@CLUTTER_SONAME_INFIX@-@CLUTTER_API_VERSION@.la
|
||||||
|
|
||||||
|
|
||||||
noinst_PROGRAMS = test-interactive
|
noinst_PROGRAMS = test-interactive
|
||||||
|
|
||||||
test_interactive_SOURCES = test-main.c $(UNIT_TESTS)
|
test_interactive_SOURCES = test-main.c $(UNIT_TESTS)
|
||||||
|
Loading…
Reference in New Issue
Block a user