Ogre 1.10 uses deprecated build tools on android
Description
Environment
Activity

Pavel Rojtberg December 23, 2017 at 1:36 PM(edited)
The create_android_proj macro(inside CMake/Utils/AndroidMacros.cmake) is writing a makefile - maybe this could be replaced by a CMake build file
was fixed in master

Pavel Rojtberg July 23, 2017 at 11:59 PM
yes, we should at least add CMake & gradle build scritpts for android. Feel free to make a pull-request for this.
If you use github, the CI will ensure that the old way (Makefiles) still works:
https://github.com/OGRECave/ogre/pulls

Former user July 23, 2017 at 8:25 PM
Ok i dont noticed this, because my build machine(Fedora 25) has CMake 3.8(and this dont resulted in an error).
Even if not replacing the toolchain delivered with OGRE, the wiki should be updated at some places.
Maybe there could even be described how to use the toolchain that comes with the NDK.
I tried to build OGRE with the toolchain delivered with the ndk(using Clang) and it mostly works.
The only problem are the create_android_proj macros which generate Makefiles that dont work well with Clang(some strange errors about unknown command line options).
Also inside this Makefile there is the used STL hardcoded, which may end in different C++ Runtimes mixed(which doesnt work according to the NDK documentation), when using a different one to build OGRE.
But even if the Native Libraries would build, there is still the problem with the "android" command.
This could be solved somehow by using Android Studio projects(according to https://developer.android.com/studio/tools/help/android.html).
When delivering an already created(with Android Studio) project, the user wouldnt need to have Android Studio installed, but gradle.

Pavel Rojtberg July 20, 2017 at 5:39 PM
the NDK toolchain requires CMake 3.6.0, while we only have 2.8.12 on the build server (Travis, Ubuntu 14.04). And even Ubuntu 16.04 just has 3.5.1.
To build ogre on android there are some deprecated build tools used:
To compile as described in the wiki, GCC is used which has been deprecated in favour of Clang
The android toolchain may be removed(CMake/toolchain/android.toolchain.cmake) because the newest NDK already contains one(build/cmake/android.toolchain.cmake) which uses Clang by default
The create_android_proj macro(inside CMake/Utils/AndroidMacros.cmake) is writing a makefile - maybe this could be replaced by a CMake build file
The create_android_proj macro is using the "android" command which is deprecated and was removed in the newest Android SDK Tools