taka-no-me / android-cmake

CMake toolchain file and other scripts for the Android NDK
1.22k stars 438 forks source link

how to compile source for android using CMake #91

Open ntimesc opened 8 years ago

ntimesc commented 8 years ago

i am trying to compile poco for android using CMake , i am using CMake 3.5.2 and Android CMake

https://github.com/taka-no-me/android-cmake

C:\Program Files (x86)\CMake\bin>cmake -DCMAKE_TOOLCHAIN_FILE="E:\ndk\android-cm ake-master\android.toolchain.cmake" -DANDROIDNDK="D:\android-ndk-r10e" -DCMAKE BUILD_TYPE=Release -DANDROID_ABI="armeabi" "E:\ndk\poco-1.7.3" && cmake --build


i am getting following error 

> CMake Error at CMakeLists.txt:11 (project):
>   CMAKE_SYSTEM_NAME is 'Android' but 'NVIDIA Nsight Tegra Visual Studio
>   Edition' is not installed.
> 
> 
> -- Configuring incomplete, errors occurred!
> See also "C:/Program Files (x86)/CMake/bin/CMakeFiles/CMakeOutput.log".

can anyone please suggest a proper roadmap to compile it for android , i hunt over a net a lot but couldnt find anything
yuangu commented 7 years ago

cmake -G "MinGW Makefiles" -DCMAKE_TOOLCHAIN_FILE=C:/code/android-cmake/android.toolchain.cmake -DCMAKE_MAKE_PROGRAM= "%ANDROID_NDK%\prebuilt\windows\bin\make.exe" -DANDROID_NATIVE_API_LEVEL=android-19 ..

it's work.