[CMake] dependency of dependency
mathieu.malaterre at gmail.com
Wed Nov 26 07:36:19 EST 2008
On Wed, Nov 26, 2008 at 12:06 PM, Hugo Heden <hugoheden at gmail.com> wrote:
> 2008/11/26 Mathieu Malaterre <mathieu.malaterre at gmail.com>:
>> Hi there,
> Hi there!
>> I remember there is now a new behavior in cmake where you can
>> specify not to pull a dependency of dependency. For instance my
>> project is linking to vtk which itself is linking to libtiff. If I do
>> not have libtiff.so (the symlink), I get error.
>> make: *** No rule to make target `/usr/lib/libtiff.so', needed by
>> `bin/libvtkgdcm.so.2.0.9'. Stop.
>> make: Leaving directory `/tmp/buildd/gdcm-2.0.9/debian/build-python2.4'
>> From gdcm I am not explicitely linking to libtiff, simlpy to
>> libvtkIO. How can I avoid this behavior (all my libs are shared libs)
> Perhaps by setting property LINK_INTERFACE_LIBRARIES to ""? Example follows.
> /Hugo Heden
> TARGET_LINK_LIBRARIES( mylib otherlib )
> # http://www.vtk.org/Bug/view.php?id=3490 ..When other executables and
> # shared libraries link to libmylib.so, they should not necessarily
> # link to the stuff that libmylib.so linked to, just because
> # libmylib.so linked to them. (That is otherwise the default in
> # CMake). So we have to do this:
> SET_PROPERTY( TARGET mylib PROPERTY LINK_INTERFACE_LIBRARIES "" )
I think that's what I was looking for ... except this is the opposite
behavior. I would need to patch VTK itself to get the right behavior.
I'll check with the debian packager to see if we can come up with a solution.
More information about the CMake