I recently added a test to the CMake test suite that demonstrates how to build a very rudimentary iOS app (a simple skeletal navigation bar app, mostly generated by the "Xcode new project" dialog...)
It can be found at: CMake/Tests/iOSNavApp in the current checkout of git 'master' and 'next' It is not included in the CMake test suite by default because most of our dashboard Macs are not set up for iOS dev work by default. 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. I've not used a makefile generator or a cross-compile-via-makefiles technique with this sample project at all. Perhaps you could take a look at the sources for the iOSNavApp test application, and see if there's anything done in that project that you could adapt for your needs. The iOS support in CMake is still pretty bleeding edge -- let me know if there's anything we can do to improve how it works from your perspective. Thanks, David On Tue, Sep 20, 2011 at 11:25 AM, Daniel Dekkers <d.dekk...@cthrough.nl> wrote: > Hi, > > I'm really having a hard time creating a CMake setup for iOS. > > After... > - the toolchain files for cross-compiling, > - the Settings.bundle, > - the Info.plist file, > - the provisioning profiles, > - the entitlements, > ...the latest chapter consists of the Interface Builder .xib files. > > An iOS application bundle needs a .nib file that is compiled from a .xib file > and added to the application bundle. I've got a script for that: > > # We need to compile the interface builder *.xib files to > *.nib files to add to the bundle > # Make sure we can find the 'ibtool' program. If we can NOT > find it we skip generation of this project > FIND_PROGRAM( IBTOOL ibtool HINTS "/usr/bin" > "${OSX_DEVELOPER_ROOT}/usr/bin" ) > if ( ${IBTOOL} STREQUAL "IBTOOL-NOTFOUND" ) > MESSAGE( SEND_ERROR "ibtool can not be found" ) > ENDIF() > > # Compile the .xib files using the 'ibtool' program with the > destination being the app package > FOREACH( xib ${RSRC_IOS_XIB_FILES} ) > ADD_CUSTOM_COMMAND( TARGET ${APP_NAME} POST_BUILD > COMMAND ${IBTOOL} --errors --warnings > --notices --output-format human-readable-text > --compile > > ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${RT_APP_NAME}.app/${xib}.nib > # iOS uses a flat hierarchy, place directly under .app > ${APP_ROOT}/rsrc/apple/ios/${xib}.xib > COMMENT "Compiling > ${APP_ROOT}/rsrc/apple/ios/${xib}.xib") > ENDFOREACH() > > But once I use the script. I constantly receive a "A signed resource has been > added, modified, or deleted." error when running on the device. > This makes some sense, because all the files in the bundle are codesigned and > adding a new .nib file for every build might give signing problems. > > But I'm running out of ideas how to fix this. > Any suggestions? > Or, more general... is there anyone else who is walking, or has walked, this > CMake/iOS path? > > Kind Regards, > > Daniel Dekkers > > > > _______________________________________________ > 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 > _______________________________________________ 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