[CMake] Adding dependencies for static libraries

Robert Bielik robert at xponaut.com
Tue Oct 16 14:08:38 EDT 2012


Titus von Boxberg skrev 2012-10-16 19:11:
> That wasn't clear from your first post.

Yes, your're right, sorry 'bout that.

> I doubt that this is the intended behaviour of target_link_libraries.

Nominally target_link_libraries isn't used at all for static libs, but if it should be, I'd expect the same behavior as that for
shared libraries, which is to add the dependency libs to "Additional Dependencies". It just seems that no one thought of
implementing it for the VS generators in the static lib case.

> If you want the librarian to combine A and B into a single A+
> than you might as well add a post build step of A to do so.

Yup, true, I don't know yet how to do it though, I had hopes that CMake would come to the rescue...

Regards,
/Rob


More information about the CMake mailing list