In my CMake configuration files I have something like the following:<div><br></div><div><br></div><div>if(SYSTEM STREQUAL &quot;iOS&quot;)</div><div>    set(CMAKE_C_COMPILER &quot;foo&quot; CACHE STRING &quot;message&quot; FORCE)</div>
<div>    set(CMAKE_CXX_COMPILER &quot;bar&quot; CACHE STRING &quot;message&quot; FORCE)</div><div>endif(SYSTEM STREQUAL &quot;iOS&quot;)<br><br></div><div>Then when configuring the system I pass -DSYSTEM:STRING=iOS on the command line (or through a GUI).  </div>
<div><br></div><div>For my iOS system I use the makefile generator.</div><div><br></div><div>Steve</div><div><br></div><div><br><div class="gmail_quote">2011/2/15 Alexander Neundorf <span dir="ltr">&lt;<a href="mailto:a.neundorf-work@gmx.net">a.neundorf-work@gmx.net</a>&gt;</span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">On Monday 14 February 2011, Steven Wilson wrote:<br>
&gt; My apologies if this question has been asked and answered previously.    I<br>
&gt; have a CMake system that I use for cross compilation for iOS software (ie<br>
&gt; reset CMAKE_C_COMPILER, etc...).<br>
<br>
</div>How do you do that ?<br>
You have to set CMAKE_C_COMPILER, CMAKE_CXX_COMPILER and CMAKE_SYSTEM_NAME.<br>
And they have to be set so that they stay the same later on, e.g. by using<br>
a &quot;toolchain file&quot;.<br>
<br>
Do you do it that way or in some other way ?<br>
<br>
Do you use the makefile generator or xcode ?<br>
<br>
Alex<br>
</blockquote></div><br></div>