Android build: Add BUILDTOOLS_REVISION

The used cmake toolkit for building the Android Subsurface-mobile app
(qt-android-cmake) recently moved away from compiling with Ant in favor
of Gradle. The most recent Android SDK will not support Ant any more.

This calls for the addition of the Android SDK BUILDTOOLS_REVISION define
to the cmake of Subsurface-mobile. Without this, the build will fail.

The value has to be set to an existing directory in
.../android-sdk/build-tools/

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
This commit is contained in:
Jan Mulder 2017-05-25 19:15:51 +02:00 committed by Dirk Hohndel
parent 0cf8ef6e2d
commit 1df4b6c11b
2 changed files with 4 additions and 0 deletions

View file

@ -367,6 +367,7 @@ if(ANDROID)
include(${QT_ANDROID_CMAKE})
add_qt_android_apk(${SUBSURFACE_TARGET}.apk ${SUBSURFACE_TARGET}
PACKAGE_SOURCES ${CMAKE_BINARY_DIR}/android-mobile DEPENDS ${ANDROID_NATIVE_LIBSSL} ${ANDROID_NATIVE_LIBCRYPT}
BUILDTOOLS_REVISION ${BUILDTOOLS_REVISION}
)
elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
set(APP_BUNDLE_DIR "${SUBSURFACE_TARGET}.app")

3
packaging/android/build.sh Normal file → Executable file
View file

@ -38,6 +38,8 @@ BUILD_NR=0
SUBSURFACE_DESKTOP=OFF
# Which arch should we build for?
ARCH=arm
# Which SDK buildtools revision is used?
ANDROID_BUILDTOOLS_REVISION=23.0.3
while [ "$#" -gt 0 ] ; do
case "$1" in
@ -376,6 +378,7 @@ cmake $MOBILE_CMAKE \
-DFTDISUPPORT=${FTDI} \
-DANDROID_NATIVE_LIBSSL="$BUILDROOT/ndk-$ARCH/sysroot/usr/lib/libssl.so" \
-DANDROID_NATIVE_LIBCRYPT="$BUILDROOT/ndk-$ARCH/sysroot/usr/lib/libcrypto.so" \
-DBUILDTOOLS_REVISION="$ANDROID_BUILDTOOLS_REVISION" \
"$SUBSURFACE_SOURCE"
# set up the version number