The following is taken from http://www.itk.org/Wiki/CMake_FAQ

------------------------------------------------------------------------
Why are libraries linked to my shared library included when something links to 
it? 

This question arises when one has a library B which links to some
library A. When a third target, say C, links to B, CMake will
automatically include C to A also. When the libraries are static, then
this is always necessary. When the libraries are shared, this is the
default behavior provided by CMake. CMake 2.6 and above provide the
target property
"LINK_INTERFACE_LIBRARIES"
(http://www.cmake.org/HTML/cmake-2.6.html#prop_tgt:LINK_INTERFACE_LIBRARIES) to 
specify
the libraries that should be transitively included in the link by CMake. CMake 
2.4 and
below do not support the property.

Something like the following will work in CMake 2.6:

set_target_properties(mylibrary
      PROPERTIES
      LINK_INTERFACE_LIBRARIES ""
  )
------------------------------------------------------------------------

This seems the way to go...

Cheers
Dominique





-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to