[cairo] Building on Windows

zeng.shixin zeng.shixin at gmail.com
Thu Sep 24 09:29:44 PDT 2009

On Thu, Sep 24, 2009 at 2:50 AM, Tor Lillqvist <tml at iki.fi> wrote:
>> They don't seem quite in sync, or at all. What is the status of
>> either? What is considered the current best/easiest way to build for
>> Windows.
> There is also a third way  (or fourth, as the README.win32 itself
> talks about two ways...) , which I assume some people might use even
> if there doesn't seem to be related files included already in the
> source tarball: Use the Visual Studio IDE.
Or here's a fourth one, I have a git repo on github, trying to port
totem to windows. In that repo, I am trying to compile everything with
MSVC, starting from glib, cairo, zlib, etc. The build system is based
on scons (www.scons.org).

Here are the instructions to build cairo from my repo (sync'ed a few
days ago with upstream):
checkout site_init.py from http://github.com/zsx/super-totem
checkout scons branch of cairo, and then in the top directory of cairo, run:
scons --site-dir=your_downloaded_site_init_dir
PREFIX=your_prefix_for_cairo PERL=your_perl_exe_path

to install, just append install to the above command:
scons --site-dir=your_downloaded_site_init_dir
PREFIX=your_prefix_for_cairo PERL=your_perl_exe_path install

you have to have perl and scons installed first. As pixman is a
prerequisite of cairo, you might also want to see my pixman repo:
The build instructions for pixman are quite similar to that of cairo.

you can also look at the build.py file
(http://github.com/zsx/super-totem/blob/master/build.py) to see how I
build those modules.

More information about the cairo mailing list