[CMake] library usage

Mathieu Malaterre mathieu.malaterre at gmail.com
Tue May 12 10:24:03 EDT 2009


On Tue, May 12, 2009 at 3:55 PM, Simon Friedberger
<simon+cmake at a-oben.org> wrote:
> Good Morning,
>
> after some more digging yesterday I came up with this working solution:
> http://pastebin.com/m1daf62d4
> Now if you look at lines 36-38 and 46 you will notice that I had to make
> dependencies on some libraries explicit that I did not need before.
>
> Mathieu already said this was the cmake way but it makes me wonder which
> dependencies really have to be explicit and which don't. Or does that
> mean that this are really all the libraries the code is using?
>
> Also, doesn't this get very complicated and unhandy on large projects?
>
> Would be nice if somebody could provide clarification.

There is a distinction in between shared library where this behavior
works (and is recommended on most linux dist). But this certainly
won't work when linking to static lib.
See LINK_INTERFACE_LIBRARIES if you wish to achieve the behavior you
want (I do not know what it does for static libs).

2cts
-- 
Mathieu


More information about the CMake mailing list