On Friday 08 May 2009, Tyler Roscoe wrote: > On Fri, May 08, 2009 at 07:25:04PM +0200, Benoit wrote: > > And i don't know why it link also with the static library > > ..\3rdparty\lib\liblibjpeg.a ..\3rdparty\lib\libtinyxml.a because they > > have already been linked in ..\x7s\src\x7scv\libx7scv.dll.a > > ..\x7s\src\x7sxml\libx7sxml.dll.a > > By default, CMake handles transitive linking. That is, if A links to B > and B links to C, then CMake knows that A must also link to C. This is > true for shared libraries. I'm not sure how having static libraries in > the mix affects this situation,
If you create static libraries in cmake, and link them against something using target_link_libraries(), other targets linking against those static libs will also be linked against their dependencies. So yes, static libraries can appear multiple times when linking (and sometimes must appear multiple times). Alex _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake