Build and install cogl-path as a shared library

Since we now have more time to ensure that Clutter is updated to check
for the now separate cogl-path package as part of its build
configuration we are now making the package split, in line with Cogl
master.

Reviewed-by: Neil Roberts <neil@linux.intel.com>
This commit is contained in:
Robert Bragg 2013-11-27 21:02:03 +00:00
parent a0bc2d96be
commit 52a69bb9ab
9 changed files with 62 additions and 19 deletions

View File

@ -1,14 +1,11 @@
SUBDIRS = deps test-fixtures
# Until we can bump the cogl soname cogl-path is built as
# a noinst_LTLIBRARY and linked into libcogl.so so it needs
# to be built before cogl...
SUBDIRS += cogl
if BUILD_COGL_PATH
SUBDIRS += cogl-path
endif
SUBDIRS += cogl
if BUILD_COGL_PANGO
SUBDIRS += cogl-pango
endif

View File

@ -70,11 +70,19 @@ glib_enum_headers = $(source_1_x_h)
include $(top_srcdir)/build/autotools/Makefile.am.enums
endif
noinst_LTLIBRARIES = libcogl-path.la
lib_LTLIBRARIES = libcogl-path.la
libcogl_path_la_SOURCES = $(source_c) $(source_h)
nodist_libcogl_path_la_SOURCES = $(BUILT_SOURCES)
libcogl_path_la_CFLAGS = $(COGL_DEP_CFLAGS) $(COGL_GST_DEP_CFLAGS) $(COGL_EXTRA_CFLAGS) $(MAINTAINER_CFLAGS)
libcogl_path_la_CFLAGS = $(COGL_DEP_CFLAGS) $(COGL_EXTRA_CFLAGS) $(MAINTAINER_CFLAGS)
libcogl_path_la_LIBADD = $(top_builddir)/cogl/libcogl.la
libcogl_path_la_LIBADD += $(COGL_DEP_LIBS) $(COGL_EXTRA_LDFLAGS)
libcogl_path_la_LDFLAGS = \
-export-dynamic \
-export-symbols-regex "^(cogl|cogl2)_(framebuffer|path|is)_.*" \
-no-undefined \
-version-info @COGL_LT_CURRENT@:@COGL_LT_REVISION@:@COGL_LT_AGE@ \
-rpath $(libdir)
AM_CPPFLAGS = \
-DCOGL_COMPILATION \
@ -92,6 +100,15 @@ if USE_GLIB
nodist_cogl_pathheaders_HEADERS = cogl-path-enum-types.h
endif
pc_files = cogl-path-1.0.pc \
cogl-path-2.0-experimental.pc
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = $(pc_files)
EXTRA_DIST += cogl-path.pc.in
DISTCLEANFILES += $(pc_files)
dist-hook: \
$(top_builddir)/build/win32/vs9/cogl-path.vcproj \
$(top_builddir)/build/win32/vs10/cogl-path.vcxproj \

View File

@ -0,0 +1,13 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
apiversion=1.0
requires=@COGL_PKG_REQUIRES@ cogl-1.0
Name: Cogl
Description: A 2D path drawing library for Cogl
Version: @COGL_1_VERSION@
Libs: -L${libdir} -lcogl-path
Cflags: -I${includedir}/cogl
Requires: ${requires}

View File

@ -44,7 +44,11 @@
* rather then in the absolute coordinates.
*/
#include <cogl/cogl-defines.h>
#ifdef COGL_HAS_GTYPE_SUPPORT
#include <cogl-path/cogl-path-enum-types.h>
#endif
#include <cogl-path/cogl-path-types.h>

13
cogl-path/cogl-path.pc.in Normal file
View File

@ -0,0 +1,13 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
apiversion=@COGL_API_VERSION@
requires=@COGL_PKG_REQUIRES@
Name: Cogl
Description: A 2D path drawing library for Cogl
Version: @COGL_VERSION@
Libs: -L${libdir} -lcogl-path
Cflags: -I${includedir}/cogl
Requires: ${requires}

View File

@ -531,9 +531,6 @@ endif
if UNIT_TESTS
libcogl_la_LIBADD += $(top_builddir)/test-fixtures/libtest-fixtures.la
endif
if BUILD_COGL_PATH
libcogl_la_LIBADD += $(top_builddir)/cogl-path/libcogl-path.la
endif
# XXX: The aim is to eventually get rid of all private API exports
# for cogl-pango.
libcogl_la_LDFLAGS = \
@ -664,13 +661,7 @@ if UNIT_TESTS
Cogl_1_0_gir_LIBS += $(top_builddir)/test-fixtures/libtest-fixtures.la
endif
Cogl_1_0_gir_FILES = $(cogl_1_public_h) cogl-enum-types.h
if BUILD_COGL_PATH
Cogl_1_0_gir_FILES += \
$(top_builddir)/cogl-path/cogl-path-enum-types.h \
$(top_srcdir)/cogl-path/cogl-path-types.h \
$(top_srcdir)/cogl-path/cogl1-path-functions.h
endif
Cogl_1_0_gir_CFLAGS = $(AM_CPPFLAGS) $(COGL_DEP_CFLAGS) -UCOGL_ENABLE_EXPERIMENTAL_API -UCOGL_ENABLE_EXPERIMENTAL_2_0_API -UCOGL_COMPILATION -D__COGL_H_INSIDE__ -D__COGL_XLIB_H_INSIDE__
Cogl_1_0_gir_CFLAGS = $(AM_CPPFLAGS) $(COGL_DEP_CFLAGS) -UCOGL_ENABLE_EXPERIMENTAL_API -UCOGL_ENABLE_EXPERIMENTAL_2_0_API -UCOGL_COMPILATION -D__COGL_H_INSIDE__ -D__COGL_XLIB_H_INSIDE__ -DCOGL_GIR_SCANNING
Cogl_1_0_gir_INCLUDES = GL-1.0 GObject-2.0
Cogl_1_0_gir_EXPORT_PACKAGES = cogl-1.0
Cogl_1_0_gir_SCANNERFLAGS = --warn-all --c-include='cogl/cogl.h'

View File

@ -149,8 +149,15 @@
*
* The cogl_path_ api used to be part of the core Cogl api so for
* compatability we include cogl-path.h via cogl.h
*
* Note: we have to make sure not to include cogl-path.h while
* building core cogl or generating the Cogl .gir data because
* cogl-path now gets built after cogl and some cogl-path headers are
* only generated at build time...
*/
#if defined (COGL_HAS_COGL_PATH_SUPPORT)
#if defined (COGL_HAS_COGL_PATH_SUPPORT) && \
!defined (COGL_COMPILATION) && \
!defined (COGL_GIR_SCANNING)
#include <cogl-path/cogl-path.h>
#endif

View File

@ -38,7 +38,6 @@
#include "cogl-util.h"
#include "cogl-matrix-private.h"
#include "cogl1-context.h"
#include "cogl-path/cogl-path.h"
void
cogl_clip_push_window_rectangle (int x_offset,

View File

@ -1470,6 +1470,8 @@ cogl-pango/cogl-pango-1.0.pc
cogl-pango/cogl-pango-2.0-experimental.pc
cogl-pango/cogl-pango.rc
cogl-path/Makefile
cogl-path/cogl-path-1.0.pc
cogl-path/cogl-path-2.0-experimental.pc
cogl-gst/Makefile
cogl-gst/cogl-gst.pc
cogl-gles2/Makefile