[CMake] TARGET_LINK_LIBRARIES with full path libraries

Volker Pilipp volker.pilipp at dectris.com
Thu Sep 18 01:52:44 EDT 2014


That actually does the trick. But it's not nice, because there are many
targets in the project.
Actually, I do not know about any use case, where cmake should replace a
full path to a lib
by its "-l" shortcut.

Thank you very much for your help.

Volker

On Wed, Sep 17, 2014 at 10:40 PM, j s <j.s4403 at gmail.com> wrote:

> Would it be possible to set something like:
> TARGET_LINK_LIBRARIES(myexe -L/opt/XXX/lib -lcurl)
> in the path?
>
>
> On Wed, Sep 17, 2014 at 9:33 AM, Nils Gladitz <nilsgladitz at gmail.com>
> wrote:
> > On 09/17/2014 02:50 PM, Volker Pilipp wrote:
> >>
> >> I see that /usr/lib64 (where libcurl.so.3 resides) is before
> >> /opt/XXX/lib (where libcurl.so.4 resides). That's why g++ links against
> >> the wrong library. However, this problem would not occur if I could stop
> >> cmake from replacing /opt/XXX/lib/libcurl.so by -lcurl :-(
> >
> >
> > Maybe you could bring this up on the issue tracker:
> >   http://public.kitware.com/Bug/my_view_page.php
> >
> > I am not entirely sure what the proper thing to do would be.
> >
> > Nils
> >
> >
> > --
> >
> > Powered by www.kitware.com
> >
> > Please keep messages on-topic and check the CMake FAQ at:
> > http://www.cmake.org/Wiki/CMake_FAQ
> >
> > Kitware offers various services to support the CMake community. For more
> > information on each offering, please visit:
> >
> > CMake Support: http://cmake.org/cmake/help/support.html
> > CMake Consulting: http://cmake.org/cmake/help/consulting.html
> > CMake Training Courses: http://cmake.org/cmake/help/training.html
> >
> > Visit other Kitware open-source projects at
> > http://www.kitware.com/opensource/opensource.html
> >
> > Follow this link to subscribe/unsubscribe:
> > http://public.kitware.com/mailman/listinfo/cmake
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20140918/7fc46d9a/attachment-0001.html>


More information about the CMake mailing list