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

Jeff Muizelaar jeff at infidigm.net
Wed Apr 1 15:15:32 PDT 2009


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.

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)
 


More information about the cairo mailing list