summaryrefslogtreecommitdiffstats
path: root/packaging/android/build.sh
diff options
context:
space:
mode:
authorGravatar Jan Mulder <jlmulder@xs4all.nl>2018-11-24 10:03:50 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-12-30 11:20:34 -0800
commit6ea50fcfb776ef88ad452778a1e30105334dfb72 (patch)
treec5d8b2f7f3de3cbe9e39af487be622051a673f1d /packaging/android/build.sh
parentf11f4dc139044c1717f05899c89d2f2436a0f910 (diff)
downloadsubsurface-6ea50fcfb776ef88ad452778a1e30105334dfb72.tar.gz
Android build: set newer versions and parameterize ANDROID_PLATFORM
Hard coding desired ANDROID_PLATFORM on multiple places is simply bad. Fix this. Further, set the variables to a much newer state. CAVEAT: this will likely break android build, so be careful on bisecting. All fixed in next, related commits. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
Diffstat (limited to 'packaging/android/build.sh')
-rwxr-xr-xpackaging/android/build.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/packaging/android/build.sh b/packaging/android/build.sh
index 81db27488..1e1af3cd4 100755
--- a/packaging/android/build.sh
+++ b/packaging/android/build.sh
@@ -136,7 +136,7 @@ else
fi
if [ ! -e ndk-"$ARCH" ] ; then
- "$ANDROID_NDK_ROOT/build/tools/make_standalone_toolchain.py" --arch="$ARCH" --install-dir=ndk-"$ARCH" --api=16
+ "$ANDROID_NDK_ROOT/build/tools/make_standalone_toolchain.py" --arch="$ARCH" --install-dir=ndk-"$ARCH" --api=$ANDROID_PLATFORM_LEVEL
fi
export BUILDROOT=$PWD
export PATH=${BUILDROOT}/ndk-$ARCH/bin:$PATH
@@ -228,7 +228,7 @@ if [ "$QUICK" = "" ] ; then
make install
popd
fi
-
+
"${SUBSURFACE_SOURCE}"/scripts/get-dep-lib.sh singleAndroid . libzip
if [ ! -e "$PKG_CONFIG_LIBDIR/libzip.pc" ] ; then
# libzip expects a predefined macro that isn't there for our compiler
@@ -399,7 +399,7 @@ cmake $MOBILE_CMAKE \
-DQT_ANDROID_SDK_ROOT="$ANDROID_SDK_ROOT" \
-DQT_ANDROID_NDK_ROOT="$ANDROID_NDK_ROOT" \
-DANDROID_TOOLCHAIN="gcc" \
- -DANDROID_PLATFORM="android-16" \
+ -DANDROID_PLATFORM="$ANDROID_PLATFORM" \
-DCMAKE_TOOLCHAIN_FILE="$ANDROID_NDK_ROOT"/build/cmake/android.toolchain.cmake \
-DQT_ANDROID_CMAKE="$BUILDROOT"/qt-android-cmake/AddQtAndroidApk.cmake \
-DANDROID_STL="gnustl_shared" \