[poppler] RFC: cmake buildsystem

Jeff Muizelaar jeff at infidigm.net
Sun Dec 30 14:56:14 PST 2007


On Wed, Dec 19, 2007 at 11:10:04PM +0100, Pino Toscano wrote:
> Hi,
> 
> as we recently gave new fresh air to out VCS (cvs → git), what about some to 
> the build system? ;)
> So, this is a proposal to have cmake as at least secondary build system for 
> poppler.

I'm really not a fan of cmake. I certainly agree that autotools are not
very good, but they are the defacto standard. By choosing something
different we're sort of making the statment that we believe that cmake
is a good replacement for the autotools and I'm not sure I believe
that. Still, I do sympathize with the desire for a better build system
and it isn't a huge issue for me...

> Here there are some of the advantage using cmake in poppler can bring:
> - improve portability (ok, libtool is portable as well), cmake is a generator, 
> so you can generate usual Makefile's, KDevelop3 projects and MSVC projects 
> (so bye bye to custom Makefile for it)
> - much faster configuration phase, and compilation (without libtool)
> - files are compiled only once (and not twice - or three times for Qt 
> frontends! - )
> - (not really important, but still) differentate between xpdf and our 
> buildsystem, so there's no potential conflict when sync'ing next time(s) with 
> xpdf
> - nicer output ;)
> Some of its disadvantages:
> - a more verbose syntax, and less tied to the shell
> - some "automagics" less
- adds a dependency on cmake
- seems less flexible
- I believe it uses absolute paths in the generated makefiles

> 
> Moreover, the new buildsystem for poppler includes a small refactor of the 
> unit tests compilation, so you can selective enable/disable the Qt3, Qt4 and 
> GLib unit tests.
> 
> How to test:
> I suggest to do a clean checkout of poppler, and to unpack the attached 
> archive from the top-level. Then, create and use a separate build dir:
> $ mkdir build
> $ cd build
> $ cmake [options] ..
> $ make
> 
> The cmake options have to be specified in a different way than usual *nix 
> applications. The syntax is basically -Dkey=value. For example:
> - -DCMAKE_INSTALL_PREFIX=/prefix -- to set the installation prefix
> - -DBUILD_GTK_TESTS=ON -- to enable the compilation of the GTK+ unit tests
> and so on; you can find a list of the boolean options (that can have the value 
> of ON/OFF/on/off) in the top of the root CMakeLists.txt, specified by the 
> commands options().
> 
> All of this was successfully tested on GNU/Linux, and popplercore/Qt4 
> frontends on mingw/win32.
> 
> Feedback? Thoughts?
> -- 
> Pino Toscano





> _______________________________________________
> poppler mailing list
> poppler at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/poppler



More information about the poppler mailing list