[CMake] About structuring cmake for big project?

Boudewijn Rempt boud at valdyas.org
Wed Oct 25 08:19:30 EDT 2017


On Wed, 25 Oct 2017, Nicholas Devenish wrote:

> As a start, I'd suggest looking for other large projects that transitioned
> to using CMake - I've found LLVM useful in particular as a large but
> tightly-bound set of modular, but optional components. KDE is using CMake,
> but I've yet to find a good place to start digging - the ecosystem is so
> intimidatingly large that I'm not sure their solutions are applicable to
> anyone else except them. Hopefully Boost will move to CMake (as is
> currently proposed) and give another well known library example.

Well, there's a lot in the KDE community, but when starting out with
cmake for a large project, it really might help to take a look at
extra-cmake-modules first (https://api.kde.org/ecm/) because it contains
a lot of useful stuff, and then at just one large KDE project, like my
own, Krita. Krita actually contains two cmake systems: one to build Krita
(which consists of several executables, a bunch of libraries and a host
of plugins), and one to download and build all dependencies using cmake
external projects. 

I'm sure it can and should be improved and modernized, but it's at
least an example :-)


-- 
Boudewijn Rempt | http://www.krita.org, http://www.valdyas.org


More information about the CMake mailing list