<div dir="ltr">Without modification<div>target_link_libraries( ${target} ${target_lib} )</div><div><br></div><div>generates a link command like this....</div><div><br></div><div>gcc.exe --sysroot=c:/.../platforms/android-14/arch-arm -fPIC -g -D_DEBUG </div>
<div>  -lstdc++ -lgnustl_static -shared  -o <a href="http://libEditOptions.code.so">libEditOptions.code.so</a> CMakeFiles/EditOptions.code.dir/editopt.c.obj  </div><div>  -Lc:\..\platforms\android-14\arch-arm\usr\lib </div>
<div> -Lc:\...\sources\cxx-stl\gnu-libstdc++\4.6\libs\armeabi </div><div> ..\..\..\..\libbag.so ..\..\..\..\<a href="http://libbag.psi.so">libbag.psi.so</a> ..\..\..\..\<a href="http://libbag.externals.so">libbag.externals.so</a> ..\..\..\..\libbag.so ..\..\..\..\<a href="http://libbag.externals.so">libbag.externals.so</a> </div>
<div>-lm -landroid -llog<br></div><div><br></div><div>which results in a library that has the error</div><div><div>   : error: Cannot load library: link_image[1891]:   201 could not load needed library '..\..\..\..\libbag.so' for '<a href="http://libEditOptions.code.so">libEditOptions.code.so</a>' (load_library[1093]: Library '..\..\..\..\libbag.so' not found)</div>
<div><br></div><div><div>gcc.exe --sysroot=c:/.../platforms/android-14/arch-arm -fPIC -g -D_DEBUG </div><div>  -L C:/general/build/android.2/debug_solution/core -l bag </div><div>   -L C:/general/build/android.2/debug_solution/core -l bag.psi </div>
<div>  -L C:/general/build/android.2/debug_solution/core -l bag.externals </div><div>  -lstdc++ -lgnustl_static -shared  -o <a href="http://libbag.video.proxy.client.code.so">libbag.video.proxy.client.code.so</a> CMakeFiles/bag.video.proxy.client.code.dir/client.c.obj  </div>
<div>  -Lc:\...\platforms\android-14\arch-arm\usr\lib  </div><div>  -Lc:\...\sources\cxx-stl\gnu-libstdc++\4.6\libs\armeabi <br></div><div><br></div></div></div><div><br></div><div>So my script tests if LOCATION of ${target_lib} is something like....</div>
<div><br></div><div><div>             get_property( lib_path TARGET ${target_lib} PROPERTY LOCATION)</div><div>             if( ${lib_path} MATCHES "(.*)/([^/]*)$" )<br></div><div><br></div></div><div>which </div>
<div><div>    lib_path=C:/general/build/android.2/debug_solution/core/<a href="http://libbag.externals.so">libbag.externals.so</a></div><div><br></div></div><div>does match....</div><div>.... </div><div>which adds -L (path part) and -l <basename>,   instead of the path name that doesn't work.... </div>
<div><br></div><div>and  adds a dependancy of the targetlib on the target.</div><div><br></div><div><br></div><div>(output is from cmake 2.8.10.2; not 3)</div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Tue, May 27, 2014 at 3:01 AM, Nils Gladitz <span dir="ltr"><<a href="mailto:nilsgladitz@gmail.com" target="_blank">nilsgladitz@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="">On 05/27/2014 11:10 AM, J Decker wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
These result from the libraries resulting from the built sources, not<br>
from the sysroot libs or things discovered with find packages.<br>
<br>
</blockquote>
<br></div>
I probably don't fully understand the issue but couldn't this easily enough be patched in CMake itself (e.g. attached untested patch with CMAKE_PLATFORM_NO_SONAME_<u></u>SUPPORT set to ON)?<br>
<br>
Is there an open issue for this?<span class="HOEnZb"><font color="#888888"><br>
<br>
Nils<br>
<br>
</font></span></blockquote></div><br></div>