When building osgEarth for iOS it is important to note that it requires two separate builds to build for both the simulator and devices. The instructions below are configured to build the libraries for use with devices. Building for use in the simulator is the same but requires pointing to the proper libraries when building.
The steps to buld for use on devices are as follows:
Download OSG trunk
mkdir osgearth-build
cd ./osgearth-build
svn checkout http://www.openscenegraph.org/svn/osg/OpenSceneGraph/trunk osg-ios
cd ./osg-ios
cmake ./ -G Xcode -DOSG_BUILD_PLATFORM_IPHONE:BOOL=ON \
-DBUILD_OSG_APPLICATIONS:BOOL=OFF \
-DOSG_WINDOWING_SYSTEM:STRING=IOS \
-DOSG_DEFAULT_IMAGE_PLUGIN_FOR_OSX="imageio" \
-DOSG_GL1_AVAILABLE:BOOL=OFF \
-DOSG_GL2_AVAILABLE:BOOL=OFF \
-DOSG_GLES1_AVAILABLE:BOOL=OFF \
-DOSG_GLES2_AVAILABLE:BOOL=ON \
-DOSG_GL_DISPLAYLISTS_AVAILABLE:BOOL=OFF \
-DOSG_GL_FIXED_FUNCTION_AVAILABLE:BOOL=OFF \
-DOSG_GL_LIBRARY_STATIC:BOOL=OFF \
-DOSG_GL_MATRICES_AVAILABLE:BOOL=OFF \
-DOSG_GL_VERTEX_ARRAY_FUNCS_AVAILABLE:BOOL=OFF \
-DOSG_GL_VERTEX_FUNCS_AVAILABLE:BOOL=OFF \
-DCURL_INCLUDE_DIR:PATH="/Users/hogbox/Documents/osgearth-build/3rdParty/curl-ios-device/include" \
-DCURL_LIBRARY:PATH="/Users/hogbox/Documents/osgearth-build/3rdParty/curl-ios-device/lib/libcurl.a" \
-DFREETYPE_INCLUDE_DIR_freetype2:PATH="/Users/hogbox/Documents/osgearth-build/3rdParty/freetype-ios-universal/include/freetype" \
-DFREETYPE_INCLUDE_DIR_ft2build:PATH="/Users/hogbox/Documents/osgearth-build/3rdParty/freetype-ios-universal/include" \
-DFREETYPE_LIBRARY:PATH="/Users/hogbox/Documents/osgearth-build/3rdParty/freetype-ios-universal/lib/libFreeType_iphone_universal.a" \
-DTIFF_INCLUDE_DIR:PATH="/Users/hogbox/Documents/osgearth-build/3rdParty/tiff-ios-device/include" \
-DTIFF_LIBRARY:PATH="/Users/hogbox/Documents/osgearth-build/3rdParty/tiff-ios-device/lib/libtiff.a" \
-DGDAL_INCLUDE_DIR:PATH="/Users/hogbox/Documents/osgearth-build/3rdParty/gdal-ios-device/include" \
-DGDAL_LIBRARY:PATH="/Users/hogbox/Documents/osgearth-build/3rdParty/gdal-ios-device/lib/libgdal.a" \
-DDYNAMIC_OPENSCENEGRAPH:BOOL=OFF \
-DDYNAMIC_OPENTHREADS:BOOL=OFF
Open XCode project generated and run BUILD_ALL target
Download osgEarth trunk
cd ../
git clone git://github.com/gwaldron/osgearth.git osgearth-ios
Edit iOS SDK version in ``./osgearth-ios/CMakeList.txt`` (see item 5)
cmake ./ -G Xcode -DOSG_BUILD_PLATFORM_IPHONE:BOOL=ON \
-DOSG_DIR:PATH="/Users/hogbox/Documents/osgearth-build/osg-ios" \
-DCURL_INCLUDE_DIR:PATH="/Users/hogbox/Documents/osgearth-build/3rdParty/curl-ios-device/include" \
-DCURL_LIBRARY:PATH="/Users/hogbox/Documents/osgearth-build/3rdParty/curl-ios-device/lib/libcurl.a" \
-DGDAL_INCLUDE_DIR:PATH="/Users/hogbox/Documents/osgearth-build/3rdParty/gdal-ios-device/include" \
-DGDAL_LIBRARY:PATH="/Users/hogbox/Documents/osgearth-build/3rdParty/gdal-ios-device/lib/libgdal.a" \
-DGEOS_INCLUDE_DIR:PATH="/Users/hogbox/Documents/osgearth-build/3rdParty/geos-ios-device/include/source/headers" \
-DGEOS_LIBRARY:PATH="/Users/hogbox/Documents/osgearth-build/3rdParty/geos-ios-device/lib/libGEOS_3.2.a" \
-DOSGEARTH_BUILD_APPLICATION_BUNDLES:BOOL=OFF \
-DDYNAMIC_OSGEARTH:BOOL=OFF \
-DOSGEARTH_USE_QT:BOOL=OFF