From 442f561ad5a1974d26f00c4da66cf2726562a4a3 Mon Sep 17 00:00:00 2001 From: Spencer Fricke Date: Wed, 4 Mar 2020 15:33:59 -0800 Subject: [PATCH] Add Android build instructions to README --- README.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 4316eade..5188ab46 100755 --- a/README.md +++ b/README.md @@ -104,7 +104,7 @@ branch. The following steps assume a Bash shell. On Windows, that could be the Git Bash shell or some other shell of your choosing. -#### 1) Check-Out this project +#### 1) Check-Out this project ```bash cd @@ -152,6 +152,14 @@ cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$(pwd)/install" $SOURCE # "Release" (for CMAKE_BUILD_TYPE) could also be "Debug" or "RelWithDebInfo" ``` +For building on Android: +```bash +cmake $SOURCE_DIR -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="$(pwd)/install" -DANDROID_ABI=arm64-v8a -DCMAKE_BUILD_TYPE=Release -DANDROID_STL=c++_static -DANDROID_PLATFORM=android-24 -DCMAKE_SYSTEM_NAME=Android -DANDROID_TOOLCHAIN=clang -DANDROID_ARM_MODE=arm -DCMAKE_MAKE_PROGRAM=$ANDROID_NDK_ROOT/prebuilt/linux-x86_64/bin/make -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_ROOT/build/cmake/android.toolchain.cmake +# If on Windows will be -DCMAKE_MAKE_PROGRAM=%ANDROID_NDK_ROOT%\prebuilt\windows-x86_64\bin\make.exe +# -G is needed for building on Windows +# -DANDROID_ABI can also be armeabi-v7a for 32 bit +``` + For building on Windows: ```bash