NOTE: To build osgEarth for iOS see Building osgEarth (and OSG) for iOS
Get the Source Code¶
Option 1: use GIT
Option 2: download a tagged version
To download a tarball or ZIP archive of the source code, visit the osgEarth Tags and select the one you want. The latest official release will be at the top.
Get the Dependencies¶
Optional depedencies: osgEarth will compile without them, but some functionality will be missing:
- GEOS 3.2.0 or later - C++ library for topological operations. osgEarth uses GEOS to perform various geometry operations like buffering and intersections. If you plan to use vector feature data in osgEarth, you probably want this.
- Minizip - ZIP file extractor; include this if you want to read KMZ files.
- QT_ - Cross-platform UI framework. Point the
QT_QMAKE_EXECUTABLECMake variable to the
qmake.exeyou want to use and CMake will populate all the other QT variables.
- LevelDB - Google’s embedded key/value store. Include this if you want to build osgEarth’s optional “leveldb” cache driver.
Deprecated dependencies: osgEarth can still use these, but they will probably go away in the future:
Optional: get pre-built dependencies
Make sure you built OSG and all the dependencies first.
Here are a few tips.
- Always do an “out-of-source” build with CMake. That is, use a build directory that is separate from the source code. This makes it easier to maintain separate versions and to keep GIT updates clean.
- For optional dependencies (like GEOS or V8), just leave the CMake field blank if you are not using it.
- For the OSG dependencies, just input the OSG_DIR variable, and when you generate CMake will automatically find all the other OSG directories.
- As always, check the forum if you have problems!