[cairo] [PATCH] win32: change how libpng and zlib are included

Behdad Esfahbod behdad at behdad.org
Fri Apr 3 11:25:37 PDT 2009


On 04/01/2009 06:15 PM, Jeff Muizelaar wrote:
> I'm not sure how the current build system intends for the png and zlib
> headers and libraries to be found. So I propose we add something like
> this which searches up a directory.

If this is what the win32 users on this list find useful, go for it.

behdad

> Thoughts?
>
> -Jeff
>
> commit b1729d40b15d4896ba587d25e0fd5e692f67a49d
> Author: Jeff Muizelaar<jmuizelaar at mozilla.com>
> Date:   Wed Apr 1 17:41:25 2009 -0400
>
>      Fix building with libpng and zlib
>
> diff --git a/build/Makefile.win32.common b/build/Makefile.win32.common
> index 2fa3255..c1f0cb8 100644
> --- a/build/Makefile.win32.common
> +++ b/build/Makefile.win32.common
> @@ -27,17 +27,19 @@ PIXMAN_LIBS := $(top_builddir)/../pixman/pixman/$(CFG)/pixman-1.lib
>
>   CAIRO_LIBS =  gdi32.lib msimg32.lib user32.lib
>   ifeq ($(CAIRO_HAS_PNG_FUNCTIONS),1)
> -CAIRO_LIBS += libpng.lib
> +LIBPNG_CFLAGS += -I$(top_srcdir)/../libpng/
> +CAIRO_LIBS +=  $(top_builddir)/../libpng/libpng.lib
>   endif
>   ifeq ($(CAIRO_HAS_PS_SURFACE)$(CAIRO_HAS_PDF_SURFACE),00)
>   else
> -CAIRO_LIBS += zdll.lib
> +ZLIB_CFLAGS += -I$(top_srcdir)/../zlib/
> +CAIRO_LIBS += $(top_builddir)/../zlib/zdll.lib
>   endif
>
>   DEFAULT_CFLAGS = -nologo $(MS_MDFLAGS) $(OPT)
>   DEFAULT_CFLAGS += -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE
>   DEFAULT_CFLAGS += -I. -I$(top_srcdir)
> -DEFAULT_CFLAGS += $(PIXMAN_CFLAGS)
> +DEFAULT_CFLAGS += $(PIXMAN_CFLAGS) $(LIBPNG_CFLAGS) $(ZLIB_CFLAGS)
>
>   CAIRO_CFLAGS = $(DEFAULT_CFLAGS) $(CFLAGS)
>
> _______________________________________________
> cairo mailing list
> cairo at cairographics.org
> http://lists.cairographics.org/mailman/listinfo/cairo
>


More information about the cairo mailing list