-
Suggestion
-
Resolution: Done
-
P3: Somewhat important
-
Qt Creator 3.0.1
-
None
-
765ad6c3d28813d4baa0aeafd03076ba76557d3d
Creator has the ability to support extra native libraries on Android. However, because native libraries come in several architectures, these need to be tweaked for each kit (armeabi, armeabi-v7a, x86, etc)
The android NDK supports ANDROID_TARGET_ARCH. When adding native libraries in Creator, rather than just assigning ANDROID_EXTRA_LIBS, equals(ANDROID_TARGET_ARCH, ...) (or contains()) should be placed to surround the ANDROID_EXTRA_LIBS so that the .pro file does not need to be modified for other platforms. Or, the environment variable used directly:
contains(ANDROID_TARGET_ARCH, x86) :
ANDROID_EXTRA LIBS += /home/user/project/x86/libmylib.so
-or-
ANDROID_EXTRA LIBS += /home/user/project/$$ANDROID_TARGET_ARCH/libmylib.so
For the latter, perhaps the path could be scanned from the end for a directory matching the target arch, and replaced with "$$ANDROID_TARGET_ARCH" so that the substitution happens automagically. Perhaps document this as well. Of course, this assumes that qmake is used in a context with ANDROID_TARGET_ARCH set.
See QTBUG-36997 (closed, out of scope for qmake),
http://blog.qt.digia.com/blog/2013/10/09/android-deployment-in-qt-5-2/
for additional info.