<div class="gmail_quote">On Fri, Sep 23, 2011 at 10:17 AM, Daniel Dekkers <span dir="ltr"><<a href="mailto:d.dekkers@cthrough.nl">d.dekkers@cthrough.nl</a>></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'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 "emulates" an iPhone on screen.<br>
I've made my version of your test "universal" (as in.. iPad and iPhone) by just adding an extra target property: XCODE_ATTRIBUTE_TARGETED_DEVICE_FAMILY '1,2'<br>
<br></blockquote><div><br>Nice. I'll consider doing that for NavApp3, too, if it's easy enough to achieve an "iPad look" to that app. I'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's the RESOURCE "${RESOURCES}" target property. That makes Xcode "resource aware".<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 "armv6;armv7;i386", which makes sense. Older devices, newer devices and simulator.<br>
And you set CMAKE_XCODE_EFFECTIVE_PLATFORMS to "-iphoneos;-iphonesimulator"<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'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'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'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'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>
> On Wed, Sep 21, 2011 at 12:41 PM, Daniel Dekkers <<a href="mailto:d.dekkers@cthrough.nl">d.dekkers@cthrough.nl</a>> wrote:<br>
>> Hi David,<br>
>><br>
>>> I have tested it manually using the Xcode generator. The point of this<br>
>>> recent work was focused on getting "simulator" and "device" builds<br>
>>> both working within the same Xcode project at the same time, and<br>
>>> allowing the developer to switch back and forth between them in the<br>
>>> Xcode UI.<br>
>>><br>
>>> There are *.xib files in this project, and they are included simply by<br>
>>> adding them as source files to add_executable.<br>
>><br>
>> Ok, i've tried that and it works. But it seems I have to "label" the .xib files first...<br>
>><br>
>> SET_SOURCE_FILES_PROPERTIES(<br>
>> ${RSRC_IOS_XIB_FILES}<br>
>> PROPERTIES<br>
>> MACOSX_PACKAGE_LOCATION Resources<br>
>> )<br>
>><br>
>> ... otherwise Xcode just seems to ignore the file (although it makes it visible in the IDE).<br>
>> If i do "label" it, Xcode recognizes the file, compiles it and adds it to the bundle in the first steps of the build process.<br>
>> So i deleted my own Cmake .xib compilation script.<br>
>><br>
><br>
> Excellent -- good to know this was helpful.<br>
><br>
><br>
>> 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>
>><br>
>> It looks like this:<br>
>><br>
>> MESSAGE(STATUS "Parsing iphone-device toolchain file")<br>
>> SET (CMAKE_SYSTEM_NAME Generic)<br>
>> SET (CMAKE_SYSTEM_VERSION 1)<br>
>> SET (CMAKE_SYSTEM_PROCESSOR arm)<br>
>><br>
>> SET (SDKVER "4.3")<br>
>> SET (DEVROOT "/Developer/Platforms/iPhoneOS.platform/Developer")<br>
>> SET (SDKROOT "${DEVROOT}/SDKs/iPhoneOS${SDKVER}.sdk")<br>
>> SET (CMAKE_OSX_SYSROOT "${SDKROOT}")<br>
>> SET (CMAKE_OSX_ARCHITECTURES "$(ARCHS_UNIVERSAL_IPHONE_OS)") # Either "$(ARCHS_UNIVERSAL_IPHONE_OS)" or "arm6" "arm7"<br>
>><br>
>> SET (CMAKE_C_COMPILER "${DEVROOT}/usr/bin/gcc-4.2")<br>
>> SET (CMAKE_CXX_COMPILER "${DEVROOT}/usr/bin/g++-4.2")<br>
>><br>
>> SET (CMAKE_FIND_ROOT_PATH "${IPHONE_SDKROOT}" "/opt/iphone-${SDK_VER}/" "/usr/local/iphone-${SDK_VER}/")<br>
>> SET (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM BOTH)<br>
>> SET (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)<br>
>> SET (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)<br>
>><br>
>> I just include it at the moment. So i'm thinking to remove the simulator/device distinction altogether and just add these settings to the main CMakeLists.txt<br>
>> Although i do like the concept of cross-compiling and toolchain files very much. With future android builds and all.<br>
>><br>
><br>
> This is also good to know. I'd definitely recommend keeping that stuff<br>
> in the toolchain file rather than putting it directly in the<br>
> CMakeLists.txt file. One of these days I'm going to try out this<br>
> cross-compiling toolchain thing for my own personal edification... :-)<br>
><br>
> Let us know if you run into any problems.<br>
><br>
><br>
> Thanks,<br>
> David<br>
<br>
</div></div></blockquote></div><br>