[CMake] CMake and iPhone support
Alexander Neundorf
a.neundorf-work at gmx.net
Wed Apr 15 16:43:59 EDT 2009
On Friday 10 April 2009, Robert Dailey wrote:
> Can CMake generate an Xcode project for iPhone SDK development (For both
> the simulator and device SDKs)? From the looks of it we cannot do that,
> especially when we use MACOSX_BUNDLE in add_executable().
As Bill suggested, maybe you can do this via setting CMAKE_OSX_ARCHITECTURES.
If not, we have to do it as a full cross-compile.
Usually if you run cmake, it detects the system it runs on and sets up
everything to build software for this system.
If you are cross compiling, you want to build for a system which is not the
system cmake is running on.
So in order to tell cmake that you want to cross compile, the minimum thing to
do is to preset CMAKE_SYSTEM_NAME when running cmake, i.e. set it
to "Darwin".
Do you use the same compiler, just with other switches when compiling for the
iPhone or is it a separate cross compiler ?
If it is a different compiler, you should preset these variables too.
The next step is to see what happens if you this with the XCode generator.
Can you manually create a Xcode project for the iPhone ?
Can you compare the project files for a simple hello world to see how they
differ ?
Alex
More information about the CMake
mailing list