[cmake-developers] Android Support
Brad King
brad.king at kitware.com
Fri Aug 12 11:13:25 EDT 2016
Hi Folks,
I've implemented native support for cross-compiling to Android with
CMake using either an Android NDK or an Android Standalone Toolchain.
I plan to include this in the CMake 3.7 release.
Please see the MR here:
https://gitlab.kitware.com/cmake/cmake/merge_requests/62
This enables building with simple toolchain files, or even without one:
$ cmake ../src -DCMAKE_SYSTEM_NAME=Android -DCMAKE_ANDROID_NDK=/path/to/ndk
Note that interface compatibility with popular third-party Android toolchain
files is a non-goal of this work (though we should not break them too much).
Instead I'd like to make the support feel native within CMake. For example,
the Android API level is naturally specified by CMAKE_SYSTEM_VERSION.
If you're interested in this support please fetch the MR branch and try
it out. The Help/manual/cmake-toolchains.7.rst manual has been updated
with documentation about how to use this.
-Brad
More information about the cmake-developers
mailing list