<div dir="ltr">hard coded names aren&#39;t so bad, since they can be composed of dynamic peices...<div><br></div><div style>lib${CMAKE_LIBRARY_SUFFIX}/${CMAKE_SHARED_LIBRARY_PREFIX}c${CMAKE_SHARED_LIBRARY_SUFFIX}</div><div style>
or</div><div style><div>lib${CMAKE_LIBRARY_SUFFIX}/${CMAKE_STATIC_LIBRARY_PREFIX}c${CMAKE_STATIC_LIBRARY_SUFFIX}</div><div><br></div><div style>to choose lib[64]/libc.so or lib[64]/libc.a  (or it would generate c.dll/c.lib for windows type compilers)</div>
</div><div style><br></div><div style>But, although you can generate portable projects that target lots of platforms, the scripts still have to have things like</div><div style><br></div><div style>if( WIN32 )</div><div style>
if( UNIX )</div><div style>etc...</div><div style><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Apr 29, 2013 at 2:38 PM, Philippe Cerfon <span dir="ltr">&lt;<a href="mailto:philcerf@gmail.com" target="_blank">philcerf@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Mon, Apr 29, 2013 at 10:40 PM, Jean-Christophe Fillion-Robin<br>
&lt;<a href="mailto:jchris.fillionr@kitware.com">jchris.fillionr@kitware.com</a>&gt; wrote:<br>
&gt; For example:<br>
&gt; <a href="https://github.com/commontk/CTK/blob/ac13c32312c9160190b80bd3a03d012782eff40c/Libs/Core/CMake/ctkMacroBFDCheck.cmake#L33-43" target="_blank">https://github.com/commontk/CTK/blob/ac13c32312c9160190b80bd3a03d012782eff40c/Libs/Core/CMake/ctkMacroBFDCheck.cmake#L33-43</a><br>

I&#39;m not sure whether I understand this correctly, or whether it is<br>
what I want ;)<br>
You still seem to hardcode the static library name (=&gt; not portable)<br>
<div class="HOEnZb"><div class="h5">--<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/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/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/listinfo/cmake</a><br>
</div></div></blockquote></div><br></div>