Hi Eike,<br><br>Thx for the good advice.<br><br>Witold<br><br><div class="gmail_quote">On 14 December 2012 14:32, Rolf Eike Beer <span dir="ltr"><<a href="mailto:eike@sf-mail.de" target="_blank">eike@sf-mail.de</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Am , schrieb Witold E Wolski:<div class="im"><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
I am using<br>
<br>
FIND_LIBRARY(CPPUNIT_LIBRARY NAMES cppunit HINTS<br>
${CPPUNIT_INCLUDE_DIR}/../lib)<br>
<br>
<br>
to find library locations. But what I am needing is the directory<br>
containing the lib and not the full path.<br>
How do I get it?<br>
</blockquote>
<br></div>
cmake --help-command get_filename_component<br>
<br>
And if you think about using that for linking: all you need is the full path. Just pass that to target_link_libraries. Don't even think about messing around with link_directories().<br>
<br>
Eike<br>
--<br>
<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/<u></u>opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/<u></u>CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/<u></u>listinfo/cmake</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Witold Eryk Wolski<br><br>Triemlistrasse 155<br>8047 Zuerich<br>