In my CMake configuration files I have something like the following:<div><br></div><div><br></div><div>if(SYSTEM STREQUAL "iOS")</div><div> set(CMAKE_C_COMPILER "foo" CACHE STRING "message" FORCE)</div>
<div> set(CMAKE_CXX_COMPILER "bar" CACHE STRING "message" FORCE)</div><div>endif(SYSTEM STREQUAL "iOS")<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"><<a href="mailto:a.neundorf-work@gmx.net">a.neundorf-work@gmx.net</a>></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>
> My apologies if this question has been asked and answered previously. I<br>
> have a CMake system that I use for cross compilation for iOS software (ie<br>
> 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 "toolchain file".<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>