summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorOtto Ryynänen <otto.ryynanen@qt.io>2017-04-21 12:37:20 +0300
committerOtto Ryynänen <otto.ryynanen@qt.io>2017-04-25 09:34:24 +0000
commit2dae77433f2820abd352d1bb696bee63d787eb99 (patch)
treee631b29b25d863da2a733a2523d8f0f912ae2f13 /src
parentc7a6a451a5c277556e28dfb3b4b943719cdda7ff (diff)
downloadqtimageformats-2dae77433f2820abd352d1bb696bee63d787eb99.tar.gz
Support for Q_OS_ANDROID_EMBEDDED and android-embedded builds
The Embedded Android build (Boot to Qt Android injection) is defined by having both Q_OS_ANDROID and Q_OS_ANDROID_EMBEDDED flags defined, as well as having Qt config android-embedded. Those flags are set in mkspecs when building for embedded Android. This commit enables the possibility to build embedded Android builds. (i.e. Qt build for Android baselayer only, without JNI) Change-Id: I8d139b6d7b61c00ad44079cbfa6e5c77e8618a7b Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/3rdparty/libwebp.pri2
-rw-r--r--src/3rdparty/libwebp/src/dsp/cpu.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/3rdparty/libwebp.pri b/src/3rdparty/libwebp.pri
index 61fbee9..55d7e60 100644
--- a/src/3rdparty/libwebp.pri
+++ b/src/3rdparty/libwebp.pri
@@ -113,7 +113,7 @@ SOURCES += \
$$PWD/libwebp/src/utils/thread_utils.c \
$$PWD/libwebp/src/utils/utils.c
-android {
+android:!android-embedded {
SOURCES += $$NDK_ROOT/sources/android/cpufeatures/cpu-features.c
INCLUDEPATH += $$NDK_ROOT/sources/android/cpufeatures
}
diff --git a/src/3rdparty/libwebp/src/dsp/cpu.c b/src/3rdparty/libwebp/src/dsp/cpu.c
index b5583b6..b39184e 100644
--- a/src/3rdparty/libwebp/src/dsp/cpu.c
+++ b/src/3rdparty/libwebp/src/dsp/cpu.c
@@ -18,7 +18,7 @@
#include <string.h>
#endif
-#if defined(WEBP_ANDROID_NEON)
+#if defined(WEBP_ANDROID_NEON) && !defined(Q_OS_ANDROID_EMBEDDED)
#include <cpu-features.h>
#endif
@@ -168,7 +168,7 @@ static int x86CPUInfo(CPUFeature feature) {
return 0;
}
VP8CPUInfo VP8GetCPUInfo = x86CPUInfo;
-#elif defined(WEBP_ANDROID_NEON) // NB: needs to be before generic NEON test.
+#elif defined(WEBP_ANDROID_NEON) && !defined(Q_OS_ANDROID_EMBEDDED) // NB: needs to be before generic NEON test.
static int AndroidCPUInfo(CPUFeature feature) {
const AndroidCpuFamily cpu_family = android_getCpuFamily();
const uint64_t cpu_features = android_getCpuFeatures();