Setting up Android-CMake

1- Clone this project https://github.com/taka-no-me/android-cmake

2- You can choose the specific platform, in this case I choose android-8 (basic one)

$ANDROID_NDK/build/tools/make-standalone-toolchain.sh --platform=android-8 \
    --install-dir=$HOME/android-toolchain-cmake

3- We have to set up some variables

export ANDROID_NDK_TOOLCHAIN_ROOT=~/android-toolchain-cmake

4-

export ANDTOOLCHAIN=~/android-cmake/android.toolchain.cmake

5-Now we build the CMakelists.txt

cmake -G"MSYS Makefiles" -D CMAKE_TOOLCHAIN_FILE=$ANDTOOLCHAIN ..

6- Build of the project

make
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s