diff --git a/Makefile.am b/Makefile.am index e24041f94..a0c0c76ab 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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 diff --git a/cogl-path/Makefile.am b/cogl-path/Makefile.am index 8212a507a..ea3ed4c2d 100644 --- a/cogl-path/Makefile.am +++ b/cogl-path/Makefile.am @@ -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 \ diff --git a/cogl-path/cogl-path-2.0-experimental.pc.in b/cogl-path/cogl-path-2.0-experimental.pc.in new file mode 100644 index 000000000..9cb7c9723 --- /dev/null +++ b/cogl-path/cogl-path-2.0-experimental.pc.in @@ -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} diff --git a/cogl-path/cogl-path.h b/cogl-path/cogl-path.h index 2e7608095..3bc834f5c 100644 --- a/cogl-path/cogl-path.h +++ b/cogl-path/cogl-path.h @@ -44,7 +44,11 @@ * rather then in the absolute coordinates. */ +#include + +#ifdef COGL_HAS_GTYPE_SUPPORT #include +#endif #include diff --git a/cogl-path/cogl-path.pc.in b/cogl-path/cogl-path.pc.in new file mode 100644 index 000000000..d8b3beb8b --- /dev/null +++ b/cogl-path/cogl-path.pc.in @@ -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} diff --git a/cogl/Makefile.am b/cogl/Makefile.am index 6ac128417..b42818086 100644 --- a/cogl/Makefile.am +++ b/cogl/Makefile.am @@ -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' diff --git a/cogl/cogl.h b/cogl/cogl.h index 9d7c03ed7..6299b9114 100644 --- a/cogl/cogl.h +++ b/cogl/cogl.h @@ -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 #endif diff --git a/cogl/deprecated/cogl-clip-state.c b/cogl/deprecated/cogl-clip-state.c index 7beee4602..a1a50b0c2 100644 --- a/cogl/deprecated/cogl-clip-state.c +++ b/cogl/deprecated/cogl-clip-state.c @@ -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, diff --git a/configure.ac b/configure.ac index 44b4a27d5..10782d7bf 100644 --- a/configure.ac +++ b/configure.ac @@ -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