<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Hey!<br><br>Thank you for your reply. I tried unsetting CMAKE_XCODE_ATTRIBUTE_INSTALL_PATH<br>but since it is not defined until the generator actually runs it does nothing. An interesting not is that if I do:<br>set(CMAKE_XCODE_ATTRIBUTE_INSTALL_PATH "test")<br>all INSTALL_PATH entries in xcode become test, so there should a a connection. The problem lies in that INSTALL_PATH gets set by default to "", but a project file generated by XCode does not set it at all.<br><br>Another bug in the generating step is that this line in cmake:<br>set(CMAKE_XCODE_ATTRIBUTE_TARGETED_DEVICE_FAMILY "1,2")<br>generates<br>TARGETED_DEVICE_FAMILY = 1,2;<br>instead of what's correct:<br>TARGETED_DEVICE_FAMILY = "1,2";<br><br>However, this line:<br>set(CMAKE_XCODE_ATTRIBUTE_TARGETED_DEVICE_FAMILY "1")<br>generates:<br>TARGETED_DEVICE_FAMILY = "1";<br>which is correct. Notice the
 encompassing "".<br><br>So in order to get the encompassing "" one might try:<br>set(CMAKE_XCODE_ATTRIBUTE_TARGETED_DEVICE_FAMILY "1, 2")<br>which generates:<br>TARGETED_DEVICE_FAMILY = "1, 2";<br><br>However "1, 2" with a space after , can not be parsed by Xcode 4. <br><br>A hack which works is:<br>set(CMAKE_XCODE_ATTRIBUTE_TARGETED_DEVICE_FAMILY "1,2 ")<br>which generates:<br>TARGETED_DEVICE_FAMILY = "1,2 ";<br><br>which for some reason can be parsed and is parsed correctly by XCode 4. Note the space after 2. <br><br>Regarding INSTALL_PATH, if someone has any ideas about how this can be fixed using CMake instead of in a script run after the generating step please reply. <br><br>And another question: Where do I find the code which actually creates the entries in targets of an xcode 4 project? Is it all in the binary or are there any other run-time files which I can modify and perhaps submit as a patch? <br><br>Johan<br><br>--- Den <b>sön 2011-06-26
 skrev David Cole <i>&lt;david.cole@kitware.com&gt;</i></b>:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>Från: David Cole &lt;david.cole@kitware.com&gt;<br>Ämne: Re: [CMake] XCode4 and archiving<br>Till: johan@knutzen.se<br>Kopia: eracce@senri.se, cmake@cmake.org<br>Datum: söndag 26 juni 2011 22:37<br><br><div id="yiv1892103923">We will be getting to various Xcode 4 issues over the coming months.<div><br></div><div>In the meantime, I would look into whether there's a way to suppress the generation of the INSTALL_PATH lines rather than having to run a post-processing script. If I remember this later on.... I'll check into it myself and report back.</div>
<div><br></div><div><br></div><div>HTH,</div><div>David</div><div><br></div><div><br><div class="yiv1892103923gmail_quote">On Sun, Jun 26, 2011 at 12:11 PM, Johan Knutzen <span dir="ltr">&lt;<a rel="nofollow" ymailto="mailto:knutzen_johan@yahoo.se" target="_blank" href="/mc/compose?to=knutzen_johan@yahoo.se">knutzen_johan@yahoo.se</a>&gt;</span> wrote:<br>
<blockquote class="yiv1892103923gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">I found a workaround, if anybody is interested. The problem lies in the cmake generator setting the INSTALL_PATH to "" in the project file. Not sure why cmake does this, but a fix is to remove all entries.<br>

<br>
Here is a bash script which takes a pbxproj file as argument and fixes it:<br>
#! /bin/bash<br>
sed -i".bak" '/INSTALL_PATH/d' $1<br>
<br>
Would be helpful if somebody working on cmake would comment, and perhaps fix this issue.<br>
<br>
Johan<br>
<br>
<br>
--- Den sön 2011-06-26 skrev Johan Knutzen &lt;<a rel="nofollow" ymailto="mailto:knutzen_johan@yahoo.se" target="_blank" href="/mc/compose?to=knutzen_johan@yahoo.se">knutzen_johan@yahoo.se</a>&gt;:<br>
<br>
&gt; Från: Johan Knutzen &lt;<a rel="nofollow" ymailto="mailto:knutzen_johan@yahoo.se" target="_blank" href="/mc/compose?to=knutzen_johan@yahoo.se">knutzen_johan@yahoo.se</a>&gt;<br>
&gt; Ämne: [CMake] XCode4 and archiving<br>
&gt; Till: <a rel="nofollow" ymailto="mailto:cmake@cmake.org" target="_blank" href="/mc/compose?to=cmake@cmake.org">cmake@cmake.org</a><br>
&gt; Datum: söndag 26 juni 2011 16:00<br>
<div><div></div><div class="yiv1892103923h5">&gt; Hey!<br>
&gt;<br>
&gt; I've experienced a few hickups when using cmake with XCode<br>
&gt; 4, and one of them is the ability to create archives. In the<br>
&gt; IDE you do this by clicking Product-&gt;Archive, which<br>
&gt; results in an archive which you later can sign with<br>
&gt; different provisioning profiles when distributing iOS apps<br>
&gt; to beta testers.<br>
&gt;<br>
&gt; However, for projects generated using cmake the archiving<br>
&gt; command does not work. The result of that command should be<br>
&gt; an archiving listed in the organizer, but that is not the<br>
&gt; case when you have a cmake generated project.<br>
&gt;<br>
&gt; Does anyone have a solution or work around for this?<br>
&gt;<br>
&gt; Johan<br>
&gt; _______________________________________________<br>
&gt; Powered by <a rel="nofollow" target="_blank" href="http://www.kitware.com">www.kitware.com</a><br>
&gt;<br>
&gt; Visit other Kitware open-source projects at <a rel="nofollow" target="_blank" href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><br>
&gt;<br>
&gt; Please keep messages on-topic and check the CMake FAQ at:<br>
&gt; <a rel="nofollow" target="_blank" href="http://www.cmake.org/Wiki/CMake_FAQ">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
&gt;<br>
&gt; Follow this link to subscribe/unsubscribe:<br>
&gt; <a rel="nofollow" target="_blank" href="http://www.cmake.org/mailman/listinfo/cmake">http://www.cmake.org/mailman/listinfo/cmake</a><br>
&gt;<br>
_______________________________________________<br>
Powered by <a rel="nofollow" target="_blank" href="http://www.kitware.com">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a rel="nofollow" target="_blank" href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a rel="nofollow" target="_blank" href="http://www.cmake.org/Wiki/CMake_FAQ">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a rel="nofollow" target="_blank" href="http://www.cmake.org/mailman/listinfo/cmake">http://www.cmake.org/mailman/listinfo/cmake</a><br>
</div></div></blockquote></div><br></div>
</div><br>-----Infogad bilaga följer-----<br><br><div class="plainMail">_______________________________________________<br>Powered by www.kitware.com<br><br>Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br><br>Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br><br>Follow this link to subscribe/unsubscribe:<br><a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a></div></blockquote></td></tr></table>