<div class="gmail_quote"><div> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">&gt; I don&#39;t think direct definition of CMAKE_SYSTEM_NAME is supported.<br>

&gt; It&#39;s supposed to be detected and set by the platform files.  Only<br>
&gt; through a toolchain file should it be customized.  (Alex?)<br>
<br>
</div>Well, after all, it&#39;s just a cmake variable, so it can also be set from the<br>
command line.</blockquote><div><br></div><div>Quoting <a href="http://www.vtk.org/Wiki/CMake_Cross_Compiling">http://www.vtk.org/Wiki/CMake_Cross_Compiling</a></div><div><br></div><div>&gt; </div><div>&gt; -- The toolchain file --<br>
&gt; Defining all the variables mentioned above using -DCMAKE_SYSTEM_NAME etc. would be quite tedious and error prone. To make things easier, there is  another cmake variable you can set: <br></div><div>&gt;</div><div><br>
</div><div>so, it just convenience (and good design) to put these in a file, right?</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">
&gt; [..]  The toolchain file is just supposed to<br></div><div class="im">
&gt; specify some very basic information which triggers loading of platform-<br>
&gt; specific configuration.<br>
<br>
</div>Yes.<br>
It should only preset the things cmake can not automatically detect when cross<br>
compiling, i.e. the target system name, where the target environment is<br>
located, and which compiler to use.</blockquote><div><br></div><div>Can I argue that the need to build a statically linked executable is also a cross compiling issue? If yes, then toolchain file should also be able to set this.. <br>
</div><div> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">&gt; The documentation you reference at<br>
&gt;<br>
&gt;    <a href="http://www.cmake.org/Wiki/CMake_Cross_Compiling" target="_blank">http://www.cmake.org/Wiki/CMake_Cross_Compiling</a><br>
&gt;<br>
&gt; says that a ${CMAKE_SYSTEM_NAME}.cmake module is mandatory.<br>
&gt; The module will be loaded after CMakeGenericSystem.cmake so it gets<br>
&gt; the final say in values of variables like CMAKE_FIND_LIBRARY_SUFFIXES.<br>
&gt; This is why it works for Catamount.  You need to create a module like<br>
&gt; Catamount.cmake for your own target platform, and put it somewhere<br>
&gt; referenced by CMAKE_MODULE_PATH (Alex, can you confirm this?).<br>
<br>
</div>Yes.<br>
<br>
Alex<br>
<div><div></div><div class="h5"></div></div></blockquote><div><br></div><div>So, to sum it up, is our only option to force find_library() to seek out static libs is to create a Platform module? </div><div><br></div><div>
<br></div><div>- Levent</div></div>