NDK CMake

When used with, you can configure the NDK part CMake variables:

  1. ANDROID_PLATFORM: Target Android version, the corresponding $NDK/platforms/version of the directory. It is usually defaultConfigin minSdkVersion, or greater This ensures that all minSdkVersiondevices can be used to generate a library compiled. But there are exceptions, such as: when ANDROID_ABI=arm64-v8a, even if minSdkVersionwas 18, however ANDROID_PLATFORM=android-21, since the beginning API21 only support 64-bit libraries. Version here is directly determined using a $NDK/platformsdirectory under version which system libraries and header files.
  2. 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 .
  3. ANDROID_ARM_NEON: Specify whether CMake build support for NEONthe 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/bincross-compiler tool in the compile and link, arm-linux-androideabi-4.9indicates 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/libdirectory.

Guess you like

Origin www.cnblogs.com/ltlovezh/p/11415125.html