[CMake] CMAKE_OSX_SYSROOT being ignored?

Kenneth Riddile kfriddile at yahoo.com
Fri Jul 10 16:41:23 EDT 2009


I've found that if I don't try to set CMAKE_OSX_SYSROOT in my script, but instead set it in the GUI (I'm using the GUI), I can set it to what I want, but ONLY if I set it to the full path to the SDK like so:
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.1.sdk
Then, the generated XCode project still has issues.  First, XCode 2.4 projects are generated and I believe 3.x projects are required for all the features required for iphone development (code-signing, etc).  If I switch the project type to 3.1 in XCode, then I have to go manually set options for code-signing and other XCode 3.x stuff.  Also, the generated projects seem confused about what the valid architectures are.  If I toggle back and forth between the simulator and device configurations in XCode, it seems to fix that problem.  Then, I can compile my executable and its dependencies, but the linker paths are wrong.  Is anyone actually using CMake for iphone development and I just don't know what I'm doing, or am I trying to do something that's beyond CMake's current capabilities?  What I WANT is to use CMake to generate XCode projects where I can freely switch back and forth between device and simulator building in XCode, just like I can with
 a hand-spun project.
-Kenny Riddile
--- On Fri, 7/10/09, Bill Hoffman <bill.hoffman at kitware.com> wrote:

From: Bill Hoffman <bill.hoffman at kitware.com>
Subject: Re: [CMake] CMAKE_OSX_SYSROOT being ignored?
To: "Kenneth Riddile" <kfriddile at yahoo.com>
Cc: cmake at cmake.org
Date: Friday, July 10, 2009, 8:07 AM

Kenneth Riddile wrote:
> Hi,
> 
> I'm using CMake 2.6.4 to generate xcode projects for iphone apps.  I have nearly everything working, except that my specified setting for CMAKE_OSX_SYSROOT is being ignored in favor of the "Current OS" setting.  I am specifying it like this:
> 
> set(CMAKE_OSX_ROOT iphoneos2.1)
> 
> from looking at this post:
> 
> http://stackoverflow.com/questions/822404/how-to-set-up-cmake-to-build-an-app-for-the-iphone
> 
> Once my projects are generated, I simply have to change the SDK root in xcode to have it use the iphone SDK, but I'd like to get CMake to use the SDK I'm telling it to use.
> 

Should be CMAKE_OSX_SYSROOT.  See Modules/Platform/Darwin.cmake

-Bill
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090710/a977fd0f/attachment-0001.htm>


More information about the CMake mailing list