Skip to content

Instantly share code, notes, and snippets.

@annidy annidy/build.sh
Created Mar 9, 2018

Embed
What would you like to do?
#!/bin/sh
set -x
rm -rf libs
ABIS=(armeabi armeabi-v7a arm64-v8a)
# @see https://fucknmb.com/2017/06/27/cmake-%E4%BA%A4%E5%8F%89%E7%BC%96%E8%AF%91/
for abi in ${ABIS[@]}
do
/Users/annidy/Library/Android/sdk/cmake/3.6.3155560/bin/cmake \
-H".." \
-B"../.externalNativeBuild/cmake/release/${abi}" \
-DANDROID_ABI=${abi} \
-DANDROID_NDK=/Users/annidy/Library/Android/sdk/ndk-bundle \
-DCMAKE_LIBRARY_OUTPUT_DIRECTORY="../build/intermediates/cmake/release/obj/${abi}" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_TOOLCHAIN_FILE=/Users/annidy/Library/Android/sdk/ndk-bundle/build/cmake/android.toolchain.cmake \
-DANDROID_NATIVE_API_LEVEL=15 \
-DCMAKE_C_FLAGS="-fpic -fexceptions -frtti" \
-DCMAKE_CXX_FLAGS="-std=c++11 -fno-exceptions -fno-rtti" \
-DANDROID_STL="c++_static" \
cd ../.externalNativeBuild/cmake/release/${abi}
make
cd -
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.