<div dir="ltr">That actually does the trick. But it's not nice, because there are many targets in the project. <div>Actually, I do not know about any use case, where cmake should replace a full path to a lib <div>by its "-l" shortcut. <br><div><br></div><div>Thank you very much for your help.</div></div><div><br></div><div>Volker</div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 17, 2014 at 10:40 PM, j s <span dir="ltr"><<a href="mailto:j.s4403@gmail.com" target="_blank">j.s4403@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Would it be possible to set something like:<br>
TARGET_LINK_LIBRARIES(myexe -L/opt/XXX/lib -lcurl)<br>
in the path?<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
On Wed, Sep 17, 2014 at 9:33 AM, Nils Gladitz <<a href="mailto:nilsgladitz@gmail.com">nilsgladitz@gmail.com</a>> wrote:<br>
> On 09/17/2014 02:50 PM, Volker Pilipp wrote:<br>
>><br>
>> I see that /usr/lib64 (where libcurl.so.3 resides) is before<br>
>> /opt/XXX/lib (where libcurl.so.4 resides). That's why g++ links against<br>
>> the wrong library. However, this problem would not occur if I could stop<br>
>> cmake from replacing /opt/XXX/lib/libcurl.so by -lcurl :-(<br>
><br>
><br>
> Maybe you could bring this up on the issue tracker:<br>
>   <a href="http://public.kitware.com/Bug/my_view_page.php" target="_blank">http://public.kitware.com/Bug/my_view_page.php</a><br>
><br>
> I am not entirely sure what the proper thing to do would be.<br>
><br>
> Nils<br>
><br>
><br>
</div></div><div class="HOEnZb"><div class="h5">> --<br>
><br>
> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
><br>
> Please keep messages on-topic and check the CMake FAQ at:<br>
> <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
><br>
> Kitware offers various services to support the CMake community. For more<br>
> information on each offering, please visit:<br>
><br>
> CMake Support: <a href="http://cmake.org/cmake/help/support.html" target="_blank">http://cmake.org/cmake/help/support.html</a><br>
> CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" target="_blank">http://cmake.org/cmake/help/consulting.html</a><br>
> CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" target="_blank">http://cmake.org/cmake/help/training.html</a><br>
><br>
> Visit other Kitware open-source projects at<br>
> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://public.kitware.com/mailman/listinfo/cmake" target="_blank">http://public.kitware.com/mailman/listinfo/cmake</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div><br></div></div></div>