[CMake] dependency of dependency

Hugo Heden hugoheden at gmail.com
Wed Nov 26 06:06:54 EST 2008


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[3]: *** No rule to make target `/usr/lib/libtiff.so', needed by
> `bin/libvtkgdcm.so.2.0.9'.  Stop.
> make[3]: 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 "" )



>
> Thank you
> --
> Mathieu
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
>


More information about the CMake mailing list