기타/Ogre3D2012. 12. 7. 18:04


http://www.ogre3d.org/tikiwiki/CMake%20Quick%20Start%20Guide?tikiversion=Android

Download the dependencies and extract inside the OGRE src dir. The deps are compiled for armeabi and armeabi-v7a.

http://sourceforge.net/projects/ogre/files/ogre-dependencies-android/1.9/AndroidDependencies.zip/download

  
Windows:

1. Download and install the android sdk
http://developer.android.com/sdk/index.html

2. After the install open the "Android SDK Manager" and download & install your target API. 
Here we target the lowest possible API - which is API10 Android 2.3.3. 
Due the usage of the native activity and the asset manager if we would skip these we could go a bit lower but that would not make much sense because OGRE still needs a decent hardware to run.

3. Now add the install directory to your enviroment variables -> ANDROID_SDK = C:\Users\wolfmanfx\AppData\Local\Android\android-sdk

  • Append %ANDROID_SDK%\tools and %ANDROID_SDK%\platform-tools to your PATH variable

4. Download the android ndk

  • Extract the content to C:/android/ndk and create a env var %ANDROID_NDK%
  • Add %ANDROID_NDK% to your path
http://dl.google.com/android/ndk/android-ndk-r8c-windows.zip
Android NDK revision 8b is not supported due a bug in the toolchain

5. We need ant (http://ant.apache.org/bindownload.cgi) to build projects from the command line

Apache Ant(TM) version 1.8.4 compiled on May 22 2012

6. The build command for the deps (using Visual Studio command prompt)

cmake -G"NMake Makefiles" -DCMAKE_TOOLCHAIN_FILE=..\cmake\android.toolchain.cmake -DANDROID_ABI=armeabi ..
nmake

7. The build command for ogre (for armeabi - if you want to build for armeabi v7a just remove -DANDROID_ABI=armeabi) create a build dir inside the OGRE src tree and cd to this dir and execute this command:

cmake -G"NMake Makefiles" -DCMAKE_TOOLCHAIN_FILE=..\cmake\toolchain\android.toolchain.cmake -DOGRE_DEPENDENCIES_DIR=..\AndroidDependencies -DANDROID_ABI=armeabi -DANDROID_NATIVE_API_LEVEL=9 ..

OSX:

cmake -DCMAKE_TOOLCHAIN_FILE="`pwd`/../CMake/toolchain/android.toolchain.cmake" -DOGRE_DEPENDENCIES_DIR="`pwd`/../AndroidDependencies" -DANDROID_ABI=armeabi -DANDROID_NATIVE_API_LEVEL=9 ..

  


Posted by 삼스