Building GNOME with cmake

Okay, after my last post where I discussed waf, I've been pointed to cmake. This is what KDE4 will use, and is meant to be better than automake.

I'll cut to my personal conclusions:

  • cmake would need lots of GNOME-specific extra modules written (for instance gnome-doc-utils) and POTFILES support.
  • cmake is fast to configure and build and has pretty output
  • cmake syntax is much more concise and easy to learn than m4
  • It's not obvious how you enable make dist or make check, although I'm new to all this
  • cmake has an optional gui based (easier to use in my opinion) configuration system.
  • Lots of useful modules have already been written, for example pkg_check_modules
  • Executing stuff like “libtool –mode=execute dbus-binding-tool” is quite difficult, although this should probably be wrapped up and abstracted in a module.
  • There are not that many standards in cmake, for example do you include directories before or after you've checked for dependencies? There would need to be GNOME guidelines on this sort of stuff.
  • The supplied examples are really simple, which don't help much.
  • It's a single system-wide install leaving single CMakeLists.txt in each directory. Very clean.
  • It's an established product with many people supporting it.

I have done some testing with gnome-power-manager and found it to be stable, and fast – although it does require you practically re-writing how the build is done.

So, anybody had any good or bad experiences with cmake? Thanks.

Published by

hughsie

Richard has over 10 years of experience developing open source software. He is the maintainer of GNOME Software, PackageKit, GNOME Packagekit, GNOME Power Manager, GNOME Color Manager, colord, and UPower and also contributes to many other projects and opensource standards. Richard has three main areas of interest on the free desktop, color management, package management, and power management. Richard graduated a few years ago from the University of Surrey with a Masters in Electronics Engineering. He now works for Red Hat in the desktop group, and also manages a company selling open source calibration equipment. Richard's outside interests include taking photos and eating good food.

One thought on “Building GNOME with cmake”

  1. In my company, we were looking for an automake replacement and after several investigations (cons, cmake…) we have found a great tool in scons. http://www.scons.org/ Try it and you will understand why this tool is awesome.

Comments are closed.