From 5012bcf1d1fb09a0bece1e3d417ed7c4e3d6cd0c Mon Sep 17 00:00:00 2001 From: Robert Bragg Date: Tue, 2 Aug 2011 14:14:06 +0100 Subject: [PATCH] build: only have libcogl-pango depend on pango Only cogl-pango needs a dependency on pangocairo so we are now careful to separate the pangocairo pkg-config flags from the others so we can avoid having libcogl builds refer to them. Reviewed-by: Neil Roberts --- cogl-pango/Makefile.am | 6 +++--- cogl-pango/cogl-pango.pc.in | 2 +- configure.ac | 6 +++++- examples/Makefile.am | 1 + 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/cogl-pango/Makefile.am b/cogl-pango/Makefile.am index 9805c5814..9f0525ea6 100644 --- a/cogl-pango/Makefile.am +++ b/cogl-pango/Makefile.am @@ -27,9 +27,9 @@ source_h_priv = \ lib_LTLIBRARIES = libcogl-pango.la libcogl_pango_la_SOURCES = $(source_c) $(source_h) $(source_h_priv) -libcogl_pango_la_CFLAGS = $(COGL_DEP_CFLAGS) $(COGL_EXTRA_CFLAGS) $(MAINTAINER_CFLAGS) +libcogl_pango_la_CFLAGS = $(COGL_DEP_CFLAGS) $(COGL_PANGO_DEP_CFLAGS) $(COGL_EXTRA_CFLAGS) $(MAINTAINER_CFLAGS) libcogl_pango_la_LIBADD = $(top_builddir)/cogl/libcogl.la -libcogl_pango_la_LIBADD += $(COGL_DEP_LIBS) $(COGL_EXTRA_LDFLAGS) +libcogl_pango_la_LIBADD += $(COGL_DEP_LIBS) $(COGL_PANGO_DEP_LIBS) $(COGL_EXTRA_LDFLAGS) libcogl_pango_la_LDFLAGS = \ -export-dynamic \ -export-symbols-regex "^cogl_pango_.*" @@ -70,7 +70,7 @@ CoglPango_1_0_gir_NAMESPACE = CoglPango CoglPango_1_0_gir_VERSION = 1.0 CoglPango_1_0_gir_LIBS = libcogl-pango.la CoglPango_1_0_gir_FILES = $(source_h) $(source_c) -CoglPango_1_0_gir_CFLAGS = $(INCLUDES) $(AM_CPPFLAGS) $(COGL_DEP_CFLAGS) +CoglPango_1_0_gir_CFLAGS = $(INCLUDES) $(AM_CPPFLAGS) $(COGL_DEP_CFLAGS) $(COGL_PANGO_DEP_CFLAGS) CoglPango_1_0_gir_INCLUDES = Pango-1.0 PangoCairo-1.0 CoglPango_1_0_gir_EXPORT_PACKAGES = cogl-pango-1.0 CoglPango_1_0_gir_SCANNERFLAGS = \ diff --git a/cogl-pango/cogl-pango.pc.in b/cogl-pango/cogl-pango.pc.in index 090751068..4db8f347b 100644 --- a/cogl-pango/cogl-pango.pc.in +++ b/cogl-pango/cogl-pango.pc.in @@ -3,7 +3,7 @@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ apiversion=@COGL_API_VERSION@ -requires=@COGL_PKG_REQUIRES@ +requires=@COGL_PKG_REQUIRES@ @COGL_PANGO_PKG_REQUIRES@ Name: Cogl Description: An pango integration library for Cogl diff --git a/configure.ac b/configure.ac index 0efb9535a..05d55d8f6 100644 --- a/configure.ac +++ b/configure.ac @@ -345,7 +345,7 @@ AM_CONDITIONAL([BUILD_COGL_PANGO], [test "x$enable_cogl_pango" = "xyes"]) AS_IF([test "x$enable_cogl_pango" = "xyes"], [ - COGL_PKG_REQUIRES="$COGL_PKG_REQUIRES pangocairo >= pangocairo_req_version" + COGL_PANGO_PKG_REQUIRES="$COGL_PANGO_PKG_REQUIRES pangocairo >= pangocairo_req_version" ] ) @@ -885,6 +885,8 @@ if test -n "$COGL_PKG_REQUIRES_GL"; then COGL_DEP_CFLAGS="$COGL_DEP_CFLAGS $COGL_DEP_CFLAGS_GL" COGL_DEP_LIBS="$COGL_DEP_LIBS $gl_libs" fi +AC_SUBST(COGL_PANGO_PKG_REQUIRES) +PKG_CHECK_MODULES(COGL_PANGO_DEP, [$COGL_PANGO_PKG_REQUIRES]) dnl ================================================================ dnl Misc program dependencies. @@ -940,6 +942,8 @@ AC_DEFINE([COGL_ENABLE_EXPERIMENTAL_2_0_API], [1], AC_SUBST(COGL_DEP_CFLAGS) AC_SUBST(COGL_DEP_LIBS) +AC_SUBST(COGL_PANGO_DEP_CFLAGS) +AC_SUBST(COGL_PANGO_DEP_LIBS) AC_SUBST(COGL_EXTRA_CFLAGS) AC_SUBST(COGL_EXTRA_LDFLAGS) diff --git a/examples/Makefile.am b/examples/Makefile.am index 4f02ccf82..0dde67935 100644 --- a/examples/Makefile.am +++ b/examples/Makefile.am @@ -29,6 +29,7 @@ if BUILD_COGL_PANGO noinst_PROGRAMS += crate crate_SOURCES = crate.c crate_LDADD = $(common_ldadd) $(top_builddir)/cogl-pango/libcogl-pango.la +crate_CFLAGS = $(AM_CFLAGS) $(COGL_PANGO_DEP_CFLAGS) endif if X11_TESTS