[CMake] Targets organisation of complex project

Hendrik Sattler post at hendrik-sattler.de
Mon Oct 12 02:54:56 EDT 2009


Zitat von Mateusz Loskot <mateusz at loskot.net>:
> Trying to figure out how to organise targets I got an idea to
> configure these sub-libraries as static library targets
> (e.g. libgdal_cpl, libgdal_alg, libgdal_gcore, etc.) which
> eventually link to single shared library (libgdal.so).
> Learning CMake best practices, I stepped across an interesting
> thread: "build a shared library from static libraries"
>
> http://www.cmake.org/pipermail/cmake/2008-March/020315.html
>
> It actually smashed my original idea :-)

Why? I think you misunderstood what is written there.
It just tells you that the interdependencies of those static libs must  
be tree-like. If you cannot ensure this within your project, then you  
must use the all-at-once approach.

HS




More information about the CMake mailing list