<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">> I don't think direct definition of CMAKE_SYSTEM_NAME is supported.<br>
> It's supposed to be detected and set by the platform files. Only<br>
> through a toolchain file should it be customized. (Alex?)<br>
<br>
</div>Well, after all, it'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>> </div><div>> -- The toolchain file --<br>
> 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>></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">
> [..] The toolchain file is just supposed to<br></div><div class="im">
> specify some very basic information which triggers loading of platform-<br>
> 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">> The documentation you reference at<br>
><br>
> <a href="http://www.cmake.org/Wiki/CMake_Cross_Compiling" target="_blank">http://www.cmake.org/Wiki/CMake_Cross_Compiling</a><br>
><br>
> says that a ${CMAKE_SYSTEM_NAME}.cmake module is mandatory.<br>
> The module will be loaded after CMakeGenericSystem.cmake so it gets<br>
> the final say in values of variables like CMAKE_FIND_LIBRARY_SUFFIXES.<br>
> This is why it works for Catamount. You need to create a module like<br>
> Catamount.cmake for your own target platform, and put it somewhere<br>
> 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>