Android build

Preparation of building environment
Before you start building OpenMW on Android you have to do few steps of preparation:
 * 1) Download   Crystax NDK
 * 2) Download and install Google Android SDK
 * 3) Download Cmake for Android (it will be used for OpenMW and its dependencies compilation)
 * 4) Download java
 * 5) Download all OpenMW dependencies, ie:
 * 6) * OSG
 * 7) * Openal
 * 8) * boost integrated in crystax ndk for all android platforms
 * 9) * bullet
 * 10) * Sdl2
 * 11) * ffmpeg 1.26
 * 12) * mygui
 * 13) * zlib integrated in android

Compilation of OpenMW dependencies
Then you should add PATH for crystax ndk and google sdk.

Building OSG
Next you must build OSG from source. I build osg with this tutorials.

http://www.openscenegraph.org/index.php/documentation/platform-specifics/android/43-building-openscenegraph-for-android-3-0-2

http://www.openscenegraph.org/index.php/documentation/platform-specifics/android/178-building-openscenegraph-for-android-3-4

You must build osg with osgdb_dds osgdb_bmp, osgdb_tga ,osgdb_gif ,osgdb_jpeg, osgdb_png plugins and GLES2 profile !

Building MyGUI
Then you must build mygui with 1 rendering system

Building Bullet
Then you should build bullet2. You can use cmake android toolchain for it

Building OpenAL
Then you must build openal. http://repo.or.cz/w/openal-soft/android.git

Building Qt (optional)
Note: Qt is only used by the launcher and OpenMW-CS, and can be skipped. To build Qt 4.8 for android: http://necessitas.kde.org/ I used this tutorial for building: https://community.kde.org/Necessitas/CompileQtFramework

Building FFmpeg
Then you must build ffmpeg. Important! You must use ffmpeg 1.26: http://www.roman10.net/how-to-build-ffmpeg-with-ndk-r9/

my script for build

Building SDL2
Then you must build SDL2: https://www.libsdl.org/hg.php I used SDL2 mercurial latest source.

Building OpenMW
Then I started to build OpenMW. I copied all libraries  in one folder. For example AndroidDependencies, and build openmw like this

cmake /home/sylar/openmw -DCMAKE_TOOLCHAIN_FILE=/home/sylar/android-cmake-master/android.toolchain.cmake -DOPENMW_DEPENDENCIES_DIR=/home/sylar/AndroidDependencies -DANDROID_NATIVE_API_LEVEL=14

After builing openmw library, you must copy all the libraries to libs folder in the java project folder

For example : /eclipse-project/app/src/main/jniLibs/armeabi-v7a

Then you must import this java project in android-studio, which included with the android sdk.

Also you need to import the configuration files from desktop openmw version.