When used with, you can configure the NDK part CMake variables:
ANDROID_PLATFORM
: Target Android version, the corresponding$NDK/platforms/
version of the directory. It is usuallydefaultConfig
inminSdkVersion
, or greater This ensures that allminSdkVersion
devices can be used to generate a library compiled. But there are exceptions, such as: whenANDROID_ABI=arm64-v8a
, even ifminSdkVersion
was18
, howeverANDROID_PLATFORM=android-21
, since the beginning API21 only support 64-bit libraries. Version here is directly determined using a$NDK/platforms
directory under version which system libraries and header files.ANDROID_STL
: Specifies the use of STL library, the library is not STL comes with the Android system, the use of static libraries (c++_static
), it will link into the target libraries; if using dynamic libraries (c ++ _ shared), Gradle will be a dynamic library (libc ++ packaged with _shared.so) and the target library. For details, refer to C ++ libraries support .ANDROID_ARM_NEON
: Specify whether CMake build support forNEON
the target libraries. API than or equal to 23, the default value is true, otherwise false.
Cmake compile-time, through the $NDK/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin
cross-compiler tool in the compile and link, arm-linux-androideabi-4.9
indicates that the corresponding abi architecture and digits, such as: arm64 is aarch64-linux-android-4.9
.
The link library system depends, is in the $NDK/platforms/${ANDROID_PLATFORM}/${abi}/usr/lib
directory.