Hi David,

I'm looking at your iOSNavApp test for iOS.

A few comments as of now:

- universal -

NavApp3 is an iPhone build, if you run it on an iPad (or iPad simulator) it 
"emulates" an iPhone on screen. 
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'

- .xib compilation -

I finally understand why your .xib files are compiled correctly, while 
apparently just adding them to add_excutable(). 
It's the RESOURCE "${RESOURCES}" target property. That makes Xcode "resource 
aware".

- architectures -

You explicitly set the CMAKE_OSX_ARCHITECTURE to "armv6;armv7;i386", which 
makes sense. Older devices, newer devices and simulator.
And you set CMAKE_XCODE_EFFECTIVE_PLATFORMS to "-iphoneos;-iphonesimulator"

Which results in:

Architectures: armv6 armv7 i386
Build Active Architecture Only: No
Supported Platforms: iphonesimulator iphoneos
Valid Architectures: armv6 armv7

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:

Architectures: Optimized (armv7) 
Build Active Architecture Only: No
Supported Platforms: iphonesimulator iphoneos
Valid Architectures: armv6 armv7

And it still runs on both devices and simulators. Bit strange.

- artwork (icons/splashscreens/) -

Maybe the next step would be to add an icon.png? 

What are your plans with the iOSNavApp test?

Kind Regards, 
Daniel Dekkers

On Sep 21, 2011, at 7:30 PM, David Cole wrote:

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

--

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

Reply via email to