Android: Fix compilation on Windows
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Tue, 28 May 2013 07:57:08 +0000 (09:57 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Tue, 28 May 2013 19:53:31 +0000 (21:53 +0200)
The qtCompileTest function in configure.prf does not work when
cross-compiling on Windows because it detects the wrong make executable.
And it's anyway not the best way to do this, since what we really want
to check for is the existence of the SDK version, whereas the compile
test could potentially hide a lot of other problems under the same
error message.

Task-number: QTBUG-31405
Change-Id: I2c16b214e40bac5751d4e7098edcc30318756621
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
config.tests/android/android.pro [deleted file]
config.tests/android/main.java [deleted file]
qtmultimedia.pro

diff --git a/config.tests/android/android.pro b/config.tests/android/android.pro
deleted file mode 100644 (file)
index dcf5df1..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-CONFIG += java
-API_VERSION = android-11
-JAVASOURCES += main.java
-
diff --git a/config.tests/android/main.java b/config.tests/android/main.java
deleted file mode 100644 (file)
index 1ab8725..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-import android.graphics.SurfaceTexture;
-
-class BuildTest
-{
-    public static void main(String [] args) { }
-}
index 53f6b98..672cbc9 100644 (file)
@@ -9,7 +9,9 @@ win32 {
 } else:mac {
     qtCompileTest(avfoundation)
 } else:android {
-    !qtCompileTest(android):error("QtMultimedia for Android requires API level 11")
+    SDK_ROOT = $$(ANDROID_SDK_ROOT)
+    isEmpty(SDK_ROOT): SDK_ROOT = $$DEFAULT_ANDROID_SDK_ROOT
+    !exists($$SDK_ROOT/platforms/android-11/android.jar): error("QtMultimedia for Android requires API level 11")
 } else {
     qtCompileTest(alsa)
     qtCompileTest(pulseaudio)