[cmake-developers] MSVC LinkLibraryDependencies settable flag

Brad King brad.king at kitware.com
Tue Apr 12 11:07:35 EDT 2011


On 04/12/2011 10:29 AM, Rosen Diankov wrote:
> are you saying that target_link_libraries will add
> LinkLibraryDependencies? Or that LinkLibraryDependencies is not
> necessary?

The latter.  In fact we purposely set LinkLibraryDependencies to false
so that add_dependencies does NOT cause linking.

> the problem is that a static library compiled in cmake (for example
> the 3rdparty/collada library)  was getting linked into a cmake DLL
> (libopenrave-core). However, the collada library was linking with the
> boost DLLs and some other ones.

add_library(collada ...)
target_link_libraries(collada ${Boost_LIBS})
add_library(openrave-core ...)
target_link_libraries(openrave-core collada) # gets boost transitively

-Brad



More information about the cmake-developers mailing list