[cairo] CMake

Jason G jgmath2000 at gmail.com
Thu May 1 18:11:45 PDT 2008

Well, the benefit is twofold:

First, it's universal, in the sense that it generates Makefiles as
well as codeblocks projects, visual studio projects, kdevelop
projects, xcode projects, etc. etc.  While we can sit here and argue
all day about whether emacs/vim is a better programming environment
than visual studio, the fact is that cmake supports all of these
environments and makes your project more accessible to people who are
tied to their environment.

Using autotools instead of cmake is like having cairo but with only one backend.

Second, it gives the user more customization with respect to library
locations on the filesystem.  Instead of trying to look for a library
in a few locations or using an environment variable, with cmake you
can let the user specify directories for libraries.  Many users will
probably just put /usr/include and /usr/lib or /usr/local/... , but if
you want to test different versions of a dependency or you use windows
or something like that, you can specify the directories of your
library files for each project.  This is what I tried to do with my
cmake script.  I've found this useful for comparing how the SVN
version of a library compares to the latest ubuntu version.

Hopefully this will explain the benefits I've found in using cmake.

On Thu, May 1, 2008 at 5:49 PM, Behdad Esfahbod <behdad at behdad.org> wrote:
> On Thu, 2008-05-01 at 07:47 -0400, Jason G wrote:
>  > I was sort of hesitating to do that because these cmake files do not
>  > have the logic that the configure scripts do, they just let me build
>  > projects for my specific configuration.
>  I can't say much upon seeing that, except that learning a new language
>  looks like the very wrong approach to the problem to me.  Moreover, I
>  don't see the benefit there.  It looks just like autotools, except with
>  a different syntax.
>  Anyway, I'm not judging it just yet.
>  --
>  behdad
>  http://behdad.org/
>  "Those who would give up Essential Liberty to purchase a little
>   Temporary Safety, deserve neither Liberty nor Safety."
>         -- Benjamin Franklin, 1759

Jason G

More information about the cairo mailing list