From 1df4b6c11b9c3b84f72e3248b08f079d29caba08 Mon Sep 17 00:00:00 2001 From: Jan Mulder Date: Thu, 25 May 2017 19:15:51 +0200 Subject: [PATCH] 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 --- CMakeLists.txt | 1 + packaging/android/build.sh | 3 +++ 2 files changed, 4 insertions(+) mode change 100644 => 100755 packaging/android/build.sh diff --git a/CMakeLists.txt b/CMakeLists.txt index cca2c0a38..bd0c70e58 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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") diff --git a/packaging/android/build.sh b/packaging/android/build.sh old mode 100644 new mode 100755 index 0f2a1d0c3..b22e569bf --- a/packaging/android/build.sh +++ b/packaging/android/build.sh @@ -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