summaryrefslogtreecommitdiffstats
path: root/mkspecs
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>2013-05-16 14:35:54 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-05-21 15:24:13 +0200
commit2cde2fca6f7b584fd01c0e3eec0209447963b665 (patch)
treef9c18492d92e67df74a451cc2423ef4e0ff2e24e /mkspecs
parent184e1a37e86b736837ddbd8c99eeb95f43aa965c (diff)
Fix Qt for Android build with recent SDK bundle
In the recent revisions of the Android SDK bundle, the dx tool has moved from platform-tools/ and into build-tools/<revision-number> where revision-number is 17.0.0 at the moment. To enable building on these SDKs, we add detection for the dx tool and an environment variable which can be set to override the revision number to provide a way to build it against future revisions as well. Task-number: QTBUG-31199 Change-Id: I0d6a22163dc2e50f7a81cd3fe8f3d53c6335aaee Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Diffstat (limited to 'mkspecs')
-rw-r--r--mkspecs/features/java.prf7
1 files changed, 7 insertions, 0 deletions
diff --git a/mkspecs/features/java.prf b/mkspecs/features/java.prf
index 25f6e66427..7360103757 100644
--- a/mkspecs/features/java.prf
+++ b/mkspecs/features/java.prf
@@ -7,6 +7,11 @@ android {
isEmpty(API_VERSION): API_VERSION = android-10
}
+ isEmpty(BUILD_TOOLS_REVISION) {
+ BUILD_TOOLS_REVISION = $$(ANDROID_BUILD_TOOLS_REVISION)
+ isEmpty(BUILD_TOOLS_REVISION): BUILD_TOOLS_REVISION = 17.0.0
+ }
+
!exists($$SDK_ROOT/platforms/$$API_VERSION/android.jar) {
error("The Path $$SDK_ROOT/platforms/$$API_VERSION/android.jar does not exist. Make sure the ANDROID_SDK_ROOT and ANDROID_API_VERSION environment variables are correctly set.")
}
@@ -56,7 +61,9 @@ android:!bundled_jar_file {
DEX_CMD = $$PWD/data/android/dx $$SDK_ROOT
} else {
DEX_CMD = $$SDK_ROOT/platform-tools/dx
+ !exists($$DEX_CMD): DEX_CMD = $$SDK_ROOT/build-tools/$$BUILD_TOOLS_REVISION/dx
}
+ !exists($$DEX_CMD): error("The path $$DEX_CMD does not exist. Please set the environment variable ANDROID_BUILD_TOOLS_REVISION to the revision of the build tools installed in your Android SDK.")
QMAKE_LINK_SHLIB_CMD = $$DEX_CMD --dex --output $(TARGET) $$CLASS_DIR
} else {
QMAKE_LINK_SHLIB_CMD = jar cf $(TARGET) -C $$CLASS_DIR .