android cmake命令行

ninja这个工具是google的cmake特有的一个工具,不能用CMake官网下载安装的cmake编译安卓程序。

1
2
3
4
5
6
7
8
9
10
set SDK_PATH=E:\euhat\android-sdk
set path=%SDK_PATH%\cmake\3.10.2.4988404\bin;%path%
 
cd app
mkdir manBuild
cd manBuild
 
cmake -DANDROID_ABI=armeabi-v7a -DANDROID_STL=c++_shared -DBUILD_SHARED_LIBS=ON -DCMAKE_C_FLAGS="-s" -DANDROID_PLATFORM=android-27 -DCMAKE_BUILD_TYPE=Debug -DANDROID_NDK=%SDK_PATH%\ndk-bundle -DCMAKE_TOOLCHAIN_FILE=%SDK_PATH%\ndk-bundle\build\cmake\android.toolchain.cmake -DCMAKE_GENERATOR=Ninja ..
 
ninja

refer to: https://bbs.csdn.net/topics/392257691?list=lz