0
0
mirror of https://github.com/zeromq/libzmq.git synced 2024-12-29 00:32:34 +08:00
libzmq/builds/android/ci_build.sh
Benjamin Deroche d1ee71a634 Problem: Android build scripts does not work with latest NDK versions
Solution: Update the build scripts to work with NDK versions r23 and r24
2022-05-09 12:15:49 +02:00

32 lines
635 B
Bash
Executable File

#!/usr/bin/env bash
export NDK_VERSION=android-ndk-r24
export ANDROID_NDK_ROOT="/tmp/${NDK_VERSION}"
case $(uname | tr '[:upper:]' '[:lower:]') in
linux*)
HOST_PLATFORM=linux
;;
darwin*)
HOST_PLATFORM=darwin
;;
*)
echo "Unsupported platform"
exit 1
;;
esac
if [ ! -d "${ANDROID_NDK_ROOT}" ]; then
export FILENAME=$NDK_VERSION-$HOST_PLATFORM.zip
(cd '/tmp' \
&& wget http://dl.google.com/android/repository/$FILENAME -O $FILENAME &> /dev/null \
&& unzip -q $FILENAME) || exit 1
unset FILENAME
fi
./build.sh "arm"
./build.sh "arm64"
./build.sh "x86"
./build.sh "x86_64"