summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2017-03-09 18:49:59 -0800
committerKonstantin Käfer <mail@kkaefer.com>2017-03-10 10:00:06 -0800
commit3eaf984357afa77a676fdc8f8eb5859dbd6ca25c (patch)
tree9e0d1a5a9cdde30ab9091dd2bf653e05d5da2a12
parent12b99f0085c15ed59d10b6cc2003e6ee367bdce3 (diff)
downloadqtlocation-mapboxgl-3eaf984357afa77a676fdc8f8eb5859dbd6ca25c.tar.gz
[android] upgrade to Android NDK r14
-rwxr-xr-xplatform/android/scripts/debug.sh2
-rwxr-xr-xplatform/android/scripts/ndk.sh19
2 files changed, 12 insertions, 9 deletions
diff --git a/platform/android/scripts/debug.sh b/platform/android/scripts/debug.sh
index c3390b4ce1..909c47f992 100755
--- a/platform/android/scripts/debug.sh
+++ b/platform/android/scripts/debug.sh
@@ -7,7 +7,7 @@ set -o pipefail
export MASON_ANDROID_ARCH=x86
export MASON_ANDROID_PLATFORM=9
-export MASON_ANDROID_NDK_VERSION=r13b
+export MASON_ANDROID_NDK_VERSION=r14
export MASON_XC_ROOT=`scripts/mason.sh PREFIX android-ndk VERSION ${MASON_ANDROID_ARCH}-${MASON_ANDROID_PLATFORM}-${MASON_ANDROID_NDK_VERSION}`
source ${MASON_XC_ROOT}/toolchain.sh
diff --git a/platform/android/scripts/ndk.sh b/platform/android/scripts/ndk.sh
index 73e6ad0310..0a858a6daa 100755
--- a/platform/android/scripts/ndk.sh
+++ b/platform/android/scripts/ndk.sh
@@ -20,12 +20,15 @@ NDK_ANDROID_VERSION=$1-$3
ANDROID_NATIVE_API_LEVEL=$3
ANDROID_ABI=$2
-NDK_EXPECTED_VERSION_SHORT=r13b
-NDK_EXPECTED_VERSION_LONG=13.1.3345770
+MASON_NDK_VERSION=r14
+
+function is_supported_ndk_version {
+ [ "$1" = "13.1.3345770" ] || [ "$1" = "14.0.3770861" ]
+}
function mason_ndk {
local CMAKE=${CMAKE:-cmake}
- MASON_XC_ROOT="`${CMAKE} -P cmake/mason.cmake PREFIX android-ndk VERSION ${NDK_ANDROID_VERSION}-${NDK_EXPECTED_VERSION_SHORT}`"
+ MASON_XC_ROOT="`${CMAKE} -P cmake/mason.cmake PREFIX android-ndk VERSION ${NDK_ANDROID_VERSION}-${MASON_NDK_VERSION}`"
local TOOLCHAIN="${MASON_XC_ROOT}/toolchain.cmake"
if [ ! -f "${TOOLCHAIN}" ]; then
@@ -33,7 +36,7 @@ function mason_ndk {
exit 1
fi
- info "Using Mason-provided Android NDK at ${MASON_XC_ROOT}"
+ info "Using Mason-provided Android NDK ${MASON_NDK_VERSION} at ${MASON_XC_ROOT}"
echo CMAKE=\"${CMAKE}\"
echo CMAKE_GENERATOR=\"Ninja\"
echo CMAKE_ARGS=\" \
@@ -67,9 +70,9 @@ function system_ndk {
return 1
fi
- local NDK_VERSION_LONG=$(sed -n 's/^Pkg.Revision *= *//p' "${NDK_DIR}/source.properties")
- if [ "${NDK_VERSION_LONG}" != "${NDK_EXPECTED_VERSION_LONG}" ]; then
- warning "Android NDK version '${NDK_VERSION_LONG}' doesn't match required version '${NDK_EXPECTED_VERSION_LONG}'"
+ local SYSTEM_NDK_VERSION=$(sed -n 's/^Pkg.Revision *= *//p' "${NDK_DIR}/source.properties")
+ if ! is_supported_ndk_version "${SYSTEM_NDK_VERSION}"; then
+ warning "Android NDK version '${SYSTEM_NDK_VERSION}' doesn't match required version."
return 1
fi
@@ -102,7 +105,7 @@ function system_ndk {
return 1
fi
- info "Using system-provided Android NDK ${NDK_VERSION_LONG} at ${NDK_DIR}"
+ info "Using system-provided Android NDK ${SYSTEM_NDK_VERSION} at ${NDK_DIR}"
echo CMAKE=\"${CMAKE}\"
echo CMAKE_GENERATOR=\"Android Gradle - Ninja\"
echo CMAKE_ARGS=\" \