[cairo-commit] 3 commits - AUTHORS HACKING Makefile.am README.win32 src/Makefile.sources src/Makefile.win32

Behdad Esfahbod behdad at kemper.freedesktop.org
Wed Sep 24 14:23:33 PDT 2008

 AUTHORS              |    1 
 HACKING              |    2 -
 Makefile.am          |    1 
 README.win32         |   71 +++++++++++++++++++++++++++++++++++++++++++++++++++
 src/Makefile.sources |    4 --
 src/Makefile.win32   |    4 ++
 6 files changed, 77 insertions(+), 6 deletions(-)

New commits:
commit ab682a6ff28ca89cc0dd8fd641a0bbc42487f613
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Wed Sep 24 17:22:51 2008 -0400

    Add README.win32, courtesy of Damian Frank

diff --git a/AUTHORS b/AUTHORS
index ef14e3a..d9b7721 100644
@@ -23,6 +23,7 @@ Miklós Erdélyi <erdelyim at gmail.com> Fix typo leading to a crash
 Behdad Esfahbod <behdad at behdad.org> Huge piles of bug fixes, improvements, and general maintenance
 Brian Ewins <Brian.Ewins at gmail.com> ATSUI maintenance (first success at making it really work)
 Bertram Felgenhauer <int-e at gmx.de> Fixes for subtle arithmetic errors
+Damian Frank <damian.frank at gmail.com> Build system improvements for win32
 Bdale Garbee <bdale at gag.com> Provided essential support for cairo achitecture sessions
 Jens Granseuer <jensgr at gmx.net> Fixes to generate proper compiler flags
 Laxmi Harikumar <laxmi.harikumar at digital.com> Build fix
diff --git a/HACKING b/HACKING
index 679e676..c2998f0 100644
@@ -90,7 +90,7 @@ regular "./configure; make; make install" sequence can be used.
 See file named INSTALL for more details.
 There is limited support for a win32 build system.
-See Makefile.win32 files in various directories.
+See README.win32 and Makefile.win32 files in various directories.
diff --git a/Makefile.am b/Makefile.am
index 95ffe80..c36cfbb 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,6 +1,7 @@
 include $(top_srcdir)/build/Makefile.am.common
+	README.win32 \
 	Makefile.win32 \
 	build/Makefile.win32.common \
 	build/Makefile.win32.features \
diff --git a/README.win32 b/README.win32
new file mode 100644
index 0000000..8507fdd
--- /dev/null
+++ b/README.win32
@@ -0,0 +1,71 @@
+Building Cairo on Windows
+There are two primary ways to build Cairo on Windows.  You can use a
+UN*X-like setup, such as Cygwin, with the conventional configure
+script shipped with Cairo releases.  In this configuration, you will
+build with GCC and end up with (for instance) a Cygwin-dependent
+library.  In theory, this technique is no different than the ordinary
+build process for the Cairo library.
+The second way is to use a GNU-compatible make, but build using
+Microsoft's Visual C++ compiler to produce native libraries.  This is
+the setup this README is written for.
+Tools required
+You will need GNU make, version 3.80 or later.  Earlier versions or
+other modern make implementations may work, but are not guaranteed to.
+You will also need Microsoft Visual C++.  Version 7 has been most
+heavily tested, but other versions are likely to work fine.
+Libraries required
+Cairo requires a compatible version of the pixman library.  Full build
+instructions are beyond the scope of this document; however, using the
+same tools, it should be possible to build pixman simply by entering
+the pixman/src directory and typing:
+    make -f Makefile.win32 CFG=release
+Depending on your feature set, you may also need zlib and libpng.
+There are a few files that you will need to edit.  First, you must
+determine which features will be built.  Edit
+build/Makefile.win32.features and set the features as desired.  Note
+that most features have external dependencies; specifically,
+CAIRO_HAS_PNG_FUNCTIONS requires libpng to be present, and
+To ensure that the compiler can find all dependencies, you may need to
+edit build/Makefile.win32.common.  In particular, ensure that
+PIXMAN_CFLAGS contains a -I parameter pointing to the location of
+your pixman header files and that PIXMAN_LIBS points to the actual
+location of your pixman-1.lib file.  You may also need to edit the
+various occurrences of CAIRO_LIBS to point to other libraries
+correctly.  Note also that if you wish to link statically with zlib,
+you should replace zdll.lib with zlib.lib.
+Finally, from the top Cairo directory, type:
+    make -f Makefile.win32 CFG=release
+If this command succeeds, you will end up with src/release/cairo.dll.
+To successfully use Cairo from your own programs, you will probably
+want to move this file to some central location.  You will also
+probably want to copy the Cairo header files.  These should be placed
+in a cairo subdirectory (for instance, c:/code/common/include/cairo).
+The exact set to copy depends on your features and is reported to you
+at the end of the build.
commit 5a06ca852c909f8225d7b6e7f29668b0ac79898f
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Wed Sep 24 17:16:15 2008 -0400

    [Makefile.win32] Also report installing cairo-version.h and cairo-features.h
    Those two files needs special care and hence are not listed in

diff --git a/src/Makefile.win32 b/src/Makefile.win32
index 9b4b3fb..aa68989 100644
--- a/src/Makefile.win32
+++ b/src/Makefile.win32
@@ -22,6 +22,8 @@ all: inform $(CFG)/cairo.dll $(CFG)/cairo-static.lib
 	@echo "Built successfully!"
 	@echo "You should copy the following files to a proper place now:"
 	@echo ""
+	@echo "	cairo-version.h (NOTE: toplevel, not the src/cairo-version.h one!)"
+	@echo "	src/cairo-features.h"
+	@for x in $(enabled_cairo_headers); do echo "	src/$$x"; done
 	@echo "	src/$(CFG)/cairo.dll"
 	@echo "	src/$(CFG)/cairo-static.lib"
-	@for x in $(enabled_cairo_headers); do echo "	src/$$x"; done
commit a91101df319e11eb3d6e38b5cfa85d9ac9e7d815
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Wed Sep 24 17:15:44 2008 -0400

    [Makefile.sources] Remove mention of cairo-features-win32.h
    That file is not generated anymore.  Instead, cairo-features.h is
    generated from Makefile.win32 on the fly.

diff --git a/src/Makefile.sources b/src/Makefile.sources
index 0e2e487..2c3b468 100644
--- a/src/Makefile.sources
+++ b/src/Makefile.sources
@@ -27,10 +27,6 @@
 #     other public headers, but should NOT be distributed in the cairo
 #     distribution.
-#   * cairo-features-win32.h:
-#     This file is generated by configure and includes features used
-#     when building using the win32 build system.
 #   * cairo-version.h:
 #     This is a dummy header file used during the build, but it should
 #     NOT be installed.  Its sole purpose is to make sure changes in the

More information about the cairo-commit mailing list