<div class="gmail_quote">On Fri, Sep 23, 2011 at 10:17 AM, Daniel Dekkers <span dir="ltr">&lt;<a href="mailto:d.dekkers@cthrough.nl">d.dekkers@cthrough.nl</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi David,<br>
<br>
I&#39;m looking at your iOSNavApp test for iOS.<br>
<br>
A few comments as of now:<br>
<br>
- universal -<br>
<br>
NavApp3 is an iPhone build, if you run it on an iPad (or iPad simulator) it &quot;emulates&quot; an iPhone on screen.<br>
I&#39;ve made my version of your test &quot;universal&quot; (as in.. iPad and iPhone) by just adding an extra target property: XCODE_ATTRIBUTE_TARGETED_DEVICE_FAMILY &#39;1,2&#39;<br>
<br></blockquote><div><br>Nice. I&#39;ll consider doing that for NavApp3, too, if it&#39;s easy enough to achieve an &quot;iPad look&quot; to that app. I&#39;ll put that on my list of stuff to consider moving forward.<br>
<br><br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
- .xib compilation -<br>
<br>
I finally understand why your .xib files are compiled correctly, while apparently just adding them to add_excutable().<br>
It&#39;s the RESOURCE &quot;${RESOURCES}&quot; target property. That makes Xcode &quot;resource aware&quot;.<br></blockquote><div><br>Yes.<br><br> <br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

<br>
- architectures -<br>
<br>
You explicitly set the CMAKE_OSX_ARCHITECTURE to &quot;armv6;armv7;i386&quot;, which makes sense. Older devices, newer devices and simulator.<br>
And you set CMAKE_XCODE_EFFECTIVE_PLATFORMS to &quot;-iphoneos;-iphonesimulator&quot;<br>
<br>
Which results in:<br>
<br>
Architectures: armv6 armv7 i386<br>
Build Active Architecture Only: No<br>
Supported Platforms: iphonesimulator iphoneos<br>
Valid Architectures: armv6 armv7<br>
<br>
In my projects until now i&#39;ve been using $(ARCHS_UNIVERSAL_IPHONE_OS) for CMAKE_OSX_ARCHITECTURES, ignoring the CMAKE_XCODE_EFFECTIVE_PLATFORMS resulting in:<br>
<br>
Architectures: Optimized (armv7)<br>
Build Active Architecture Only: No<br>
Supported Platforms: iphonesimulator iphoneos<br>
Valid Architectures: armv6 armv7<br>
<br>
And it still runs on both devices and simulators. Bit strange.<br></blockquote><div><br>Hmm. So both approaches work? I&#39;ll have to analyze further to understand why.<br><br> <br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

<br>
- artwork (icons/splashscreens/) -<br>
<br>
Maybe the next step would be to add an icon.png?<br></blockquote><div><br>Good idea. I&#39;ll add that to my list also.<br><br> <br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

<br>
What are your plans with the iOSNavApp test?<br></blockquote><div><br>- To be a reasonable iOS example for people to follow.<br>- To enable it on at least one, and possibly multiple, dashboard machines that submit results nightly, to verify that this functionality keeps working into the future.<br>
- No other plans, but I&#39;m open to suggestions<br><br><br>Cheers,<br>David C.<br><br><br> <br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

<br>
Kind Regards,<br>
<font color="#888888">Daniel Dekkers<br>
</font><div><div></div><div class="h5"><br>
On Sep 21, 2011, at 7:30 PM, David Cole wrote:<br>
<br>
&gt; On Wed, Sep 21, 2011 at 12:41 PM, Daniel Dekkers &lt;<a href="mailto:d.dekkers@cthrough.nl">d.dekkers@cthrough.nl</a>&gt; wrote:<br>
&gt;&gt; Hi David,<br>
&gt;&gt;<br>
&gt;&gt;&gt; I have tested it manually using the Xcode generator. The point of this<br>
&gt;&gt;&gt; recent work was focused on getting &quot;simulator&quot; and &quot;device&quot; builds<br>
&gt;&gt;&gt; both working within the same Xcode project at the same time, and<br>
&gt;&gt;&gt; allowing the developer to switch back and forth between them in the<br>
&gt;&gt;&gt; Xcode UI.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; There are *.xib files in this project, and they are included simply by<br>
&gt;&gt;&gt; adding them as source files to add_executable.<br>
&gt;&gt;<br>
&gt;&gt; Ok, i&#39;ve tried that and it works. But it seems I have to &quot;label&quot; the .xib files first...<br>
&gt;&gt;<br>
&gt;&gt;                SET_SOURCE_FILES_PROPERTIES(<br>
&gt;&gt;                        ${RSRC_IOS_XIB_FILES}<br>
&gt;&gt;                        PROPERTIES<br>
&gt;&gt;                        MACOSX_PACKAGE_LOCATION Resources<br>
&gt;&gt;                )<br>
&gt;&gt;<br>
&gt;&gt; ... otherwise Xcode just seems to ignore the file (although it makes it visible in the IDE).<br>
&gt;&gt; If i do &quot;label&quot; it, Xcode recognizes the file, compiles it and adds it to the bundle in the first steps of the build process.<br>
&gt;&gt; So i deleted my own Cmake .xib compilation script.<br>
&gt;&gt;<br>
&gt;<br>
&gt; Excellent -- good to know this was helpful.<br>
&gt;<br>
&gt;<br>
&gt;&gt; About the simulator and device builds... much to my surprise my toolchain file for device works for the simulator as well (both iPad and iPhone).<br>
&gt;&gt;<br>
&gt;&gt; It looks like this:<br>
&gt;&gt;<br>
&gt;&gt;        MESSAGE(STATUS &quot;Parsing iphone-device toolchain file&quot;)<br>
&gt;&gt;        SET (CMAKE_SYSTEM_NAME Generic)<br>
&gt;&gt;        SET (CMAKE_SYSTEM_VERSION 1)<br>
&gt;&gt;        SET (CMAKE_SYSTEM_PROCESSOR arm)<br>
&gt;&gt;<br>
&gt;&gt;        SET (SDKVER &quot;4.3&quot;)<br>
&gt;&gt;        SET (DEVROOT &quot;/Developer/Platforms/iPhoneOS.platform/Developer&quot;)<br>
&gt;&gt;        SET (SDKROOT &quot;${DEVROOT}/SDKs/iPhoneOS${SDKVER}.sdk&quot;)<br>
&gt;&gt;        SET (CMAKE_OSX_SYSROOT &quot;${SDKROOT}&quot;)<br>
&gt;&gt;        SET (CMAKE_OSX_ARCHITECTURES &quot;$(ARCHS_UNIVERSAL_IPHONE_OS)&quot;) # Either &quot;$(ARCHS_UNIVERSAL_IPHONE_OS)&quot; or &quot;arm6&quot; &quot;arm7&quot;<br>
&gt;&gt;<br>
&gt;&gt;        SET (CMAKE_C_COMPILER &quot;${DEVROOT}/usr/bin/gcc-4.2&quot;)<br>
&gt;&gt;        SET (CMAKE_CXX_COMPILER &quot;${DEVROOT}/usr/bin/g++-4.2&quot;)<br>
&gt;&gt;<br>
&gt;&gt;        SET (CMAKE_FIND_ROOT_PATH &quot;${IPHONE_SDKROOT}&quot; &quot;/opt/iphone-${SDK_VER}/&quot; &quot;/usr/local/iphone-${SDK_VER}/&quot;)<br>
&gt;&gt;        SET (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM BOTH)<br>
&gt;&gt;        SET (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)<br>
&gt;&gt;        SET (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)<br>
&gt;&gt;<br>
&gt;&gt; I just include it at the moment. So i&#39;m thinking to remove the simulator/device distinction altogether and just add these settings to the main CMakeLists.txt<br>
&gt;&gt; Although i do like the concept of cross-compiling and toolchain files very much. With future android builds and all.<br>
&gt;&gt;<br>
&gt;<br>
&gt; This is also good to know. I&#39;d definitely recommend keeping that stuff<br>
&gt; in the toolchain file rather than putting it directly in the<br>
&gt; CMakeLists.txt file. One of these days I&#39;m going to try out this<br>
&gt; cross-compiling toolchain thing for my own personal edification... :-)<br>
&gt;<br>
&gt; Let us know if you run into any problems.<br>
&gt;<br>
&gt;<br>
&gt; Thanks,<br>
&gt; David<br>
<br>
</div></div></blockquote></div><br>