[poppler] RFC: cmake buildsystem

Pino Toscano toscano.pino at tiscali.it
Wed Dec 19 14:10:04 PST 2007


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.

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

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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: poppler-cmake.tar.gz
Type: application/x-tgz
Size: 26948 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/poppler/attachments/20071219/fd75e546/attachment-0001.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://lists.freedesktop.org/archives/poppler/attachments/20071219/fd75e546/attachment-0001.pgp 


More information about the poppler mailing list