Skip to content

Android Support

Brad King requested to merge brad.king/cmake:android-platform-modules into master

Add support for cross-compiling to Android using simple toolchain files.

Add Android platform information modules to CMake to enable building for the platform with a command as simple as:

$ cmake ../src -DCMAKE_SYSTEM_NAME=Android -DCMAKE_ANDROID_NDK=/path/to/ndk

In practice a CMAKE_TOOLCHAIN_FILE will likely be needed, but it will be limited to a few settings.

Compatibility with the interface of popular existing toolchain files like this one is a non-goal. Instead make the platform feel natural within CMake. For example, use CMAKE_SYSTEM_VERSION to specify the Android API level.

Merge request reports