<div dir="ltr">Hi Jörg,<div><br></div><div>I am not sure if there is a way to do this via cmake, maybe there is and I don't know it, but I think you need to keep an eye on such things "manually" in a way. You could use ldd or readelf to see the exact dependencies of a library in linux.</div>
<div><br></div><div>All the best,</div><div>Angeliki</div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jul 16, 2014 at 5:37 PM, Jörg Kreuzberger <span dir="ltr"><<a href="mailto:j.kreuzberger@procitec.de" target="_blank">j.kreuzberger@procitec.de</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi!<br>
<br>
i am looking for a way to determine REAL LINKER dependencies between an application and static libraries for use with gcc.<br>
<br>
the include dependencies and cmake dependencies are quite good to determine.<br>
<br>
For the linker is more or less the question, against which libraries i should link. This is done more or less by "try and error".<br>
<br>
eg. app depends on lib2. This lib depends on lib1.<br>
so in cmake i would link against lib2 and lib1<br>
<br>
ok, so i add a dependency (target_link_libraries( lib2 lib1) and link app only agains lib2.<br>
<br>
But if the link dependency changes ( lib2 does not require to link against lib1 any more), how can i detect it to remove the target_link_libraries( .. ) entry from lib2 ?<br>
<br>
Or the other way around, if i use only PARTS of lib2 that does not require to link to lib1 (stripping -ffunctions-sections), how can i determine that?<br>
<br>
Greetz,<br>
Joerg<br>
<br>
Mannheim HRB 504702<br>
Geschäftsführer: Dipl.-Ing. (FH) Michael Brenk (Vorsitzender), Dipl.-Ing. (FH) Dipl.-Inf. (FH) Jens Heyen<br>
<br>
This e-mail may contain confidential and/or legally protected information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and delete this e-mail. Any unauthorized copying, disclosure or distribution of the material in this email is strictly forbidden.<br>

Thank you!<br>
<br>
<br>
--<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: <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 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 <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></blockquote></div><br></div>