[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cmake
Subject:    Re: [CMake] CMAKE_OSX_SYSROOT being ignored?
From:       Kenneth Riddile <kfriddile () yahoo ! com>
Date:       2009-07-10 20:41:23
Message-ID: 546822.90811.qm () web38308 ! mail ! mud ! yahoo ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


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@kitware.com> wrote:

From: Bill Hoffman <bill.hoffman@kitware.com>
Subject: Re: [CMake] CMAKE_OSX_SYSROOT being ignored?
To: "Kenneth Riddile" <kfriddile@yahoo.com>
Cc: cmake@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


[Attachment #5 (text/html)]

<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: \
inherit;"><span class="Apple-style-span" style="font-family: arial, helvetica, clean, \
sans-serif; line-height: 15px; "><table cellspacing="0" cellpadding="0" border="0" \
style="border-collapse: collapse; -webkit-border-horizontal-spacing: 0px; \
-webkit-border-vertical-spacing: 0px; font-size: inherit; line-height: 1.2em; \
outline-style: none; outline-width: initial; outline-color: initial; display: table; \
"><tbody style="line-height: 1.2em; outline-style: none; outline-width: initial; \
outline-color: initial; "><tr style="line-height: 1.2em; outline-style: none; \
outline-width: initial; outline-color: initial; display: table-row; vertical-align: \
inherit; "><td valign="top" style="line-height: 1.2em; outline-style: none; \
outline-width: initial; outline-color: initial; display: table-cell; \
-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font:  \
inherit; ">I've found that if I don't try to set&nbsp;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:<div style="margin-top: 0px; \
margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; \
padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.2em; \
outline-style: none; outline-width: initial; outline-color: initial; "><br \
style="line-height: 1.2em; outline-style: none; outline-width: initial; \
outline-color: initial; "></div><div style="margin-top: 0px; margin-right: 0px; \
margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; \
padding-bottom: 0px; padding-left: 0px; line-height: 1.2em; outline-style: none; \
outline-width: initial; outline-color: initial; \
">/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.1.sdk</div><div \
style="margin-top: 0px; margin-right: 0px;  margin-bottom: 0px; margin-left: 0px; \
padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; \
line-height: 1.2em; outline-style: none; outline-width: initial; outline-color: \
initial; "><br style="line-height: 1.2em; outline-style: none; outline-width: \
initial; outline-color: initial; "></div><div style="margin-top: 0px; margin-right: \
0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; \
padding-bottom: 0px; padding-left: 0px; line-height: 1.2em; outline-style: none; \
outline-width: initial; outline-color: initial; ">Then, the generated XCode project \
still has issues. &nbsp;First, XCode 2.4 projects are generated and I believe 3.x \
projects are required for all the features required for&nbsp;<span class="yshortcuts" \
id="lw_1247258428_0" style="line-height: 1.2em; outline-style: none; outline-width: \
initial; outline-color: initial; ">iphone</span>&nbsp;development (code-signing, \
etc). &nbsp;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. &nbsp;Also, the generated \
projects seem confused about what the valid architectures are. &nbsp;If I toggle back \
and forth between the simulator and device configurations in XCode, it seems to fix \
that problem. &nbsp;Then, I can compile my executable and its dependencies, but the \
linker paths are wrong. &nbsp;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? &nbsp;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.</div><div \
style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; \
padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; \
line-height:  1.2em; outline-style: none; outline-width: initial; outline-color: \
initial; "><br style="line-height: 1.2em; outline-style: none; outline-width: \
initial; outline-color: initial; "></div><div style="margin-top: 0px; margin-right: \
0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; \
padding-bottom: 0px; padding-left: 0px; line-height: 1.2em; outline-style: none; \
outline-width: initial; outline-color: initial; ">-Kenny \
Riddile</div></td></tr></tbody></table></span><br>--- On <b>Fri, 7/10/09, Bill \
Hoffman <i>&lt;bill.hoffman@kitware.com&gt;</i></b> wrote:<br><blockquote \
style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: \
5px;"><br>From: Bill Hoffman &lt;bill.hoffman@kitware.com&gt;<br>Subject: Re: [CMake] \
CMAKE_OSX_SYSROOT being ignored?<br>To: "Kenneth Riddile" \
&lt;kfriddile@yahoo.com&gt;<br>Cc: cmake@cmake.org<br>Date: Friday, July 10, 2009, \
8:07 AM<br><br><div class="plainMail">Kenneth Riddile  wrote:<br>&gt; Hi,<br>&gt; \
<br>&gt; I'm using CMake 2.6.4 to generate xcode projects for iphone apps.&nbsp; I \
have nearly everything working, except that my specified setting for \
CMAKE_OSX_SYSROOT is being ignored in favor of the "Current OS" setting.&nbsp; I am \
specifying it like this:<br>&gt; <br>&gt; set(CMAKE_OSX_ROOT iphoneos2.1)<br>&gt; \
<br>&gt; from looking at this post:<br>&gt; <br>&gt; <a \
href="http://stackoverflow.com/questions/822404/how-to-set-up-cmake-to-build-an-app-for-the-iphone" \
target="_blank">http://stackoverflow.com/questions/822404/how-to-set-up-cmake-to-build-an-app-for-the-iphone</a><br>&gt; \
<br>&gt; 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.<br>&gt; <br><br>Should be CMAKE_OSX_SYSROOT.&nbsp; See \
Modules/Platform/Darwin.cmake<br><br>-Bill<br></div></blockquote></td></tr></table>



_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic