2017-06-02 09:53:23 +00:00
|
|
|
contains(TEMPLATE, ".*app"):!build_pass:!android-embedded {
|
2013-10-07 20:42:11 +00:00
|
|
|
|
|
|
|
defineReplace(emitString) {
|
|
|
|
return("\"$$replace(1, \\\\, \\\\)\"")
|
|
|
|
}
|
|
|
|
|
2013-09-05 11:18:15 +00:00
|
|
|
FILE_CONTENT = "{"
|
|
|
|
FILE_CONTENT += " \"description\": \"This file is generated by qmake to be read by androiddeployqt and should not be modified by hand.\","
|
|
|
|
|
2013-10-07 20:42:11 +00:00
|
|
|
FILE_CONTENT += " \"qt\": $$emitString($$[QT_INSTALL_PREFIX]),"
|
2013-09-05 11:18:15 +00:00
|
|
|
|
|
|
|
# Settings from mkspecs/environment
|
2014-07-29 13:13:57 +00:00
|
|
|
FILE_CONTENT += " \"sdk\": $$emitString($$ANDROID_SDK_ROOT),"
|
|
|
|
FILE_CONTENT += " \"sdkBuildToolsRevision\": $$emitString($$ANDROID_SDK_BUILD_TOOLS_REVISION),"
|
2013-09-05 11:18:15 +00:00
|
|
|
|
|
|
|
isEmpty(NDK_ROOT): NDK_ROOT = $$(ANDROID_NDK_ROOT)
|
|
|
|
isEmpty(NDK_ROOT): NDK_ROOT = $$DEFAULT_ANDROID_NDK_ROOT
|
2013-10-07 20:42:11 +00:00
|
|
|
FILE_CONTENT += " \"ndk\": $$emitString($$NDK_ROOT),"
|
2013-09-05 11:18:15 +00:00
|
|
|
|
2019-08-01 05:56:59 +00:00
|
|
|
FILE_CONTENT += " \"toolchain-prefix\": \"llvm\","
|
|
|
|
FILE_CONTENT += " \"tool-prefix\": \"llvm\","
|
2013-09-05 11:18:15 +00:00
|
|
|
|
|
|
|
NDK_HOST = $$(ANDROID_NDK_HOST)
|
|
|
|
isEmpty(NDK_HOST): NDK_HOST = $$DEFAULT_ANDROID_NDK_HOST
|
2013-10-07 20:42:11 +00:00
|
|
|
FILE_CONTENT += " \"ndk-host\": $$emitString($$NDK_HOST),"
|
2013-09-05 11:18:15 +00:00
|
|
|
|
2019-08-01 05:56:59 +00:00
|
|
|
for (arch, ANDROID_ABIS) {
|
|
|
|
equals(arch, x86): libs_arch = i686-linux-android
|
|
|
|
else: equals(arch, x86_64): libs_arch = x86_64-linux-android
|
|
|
|
else: equals(arch, arm64-v8a): libs_arch = aarch64-linux-android
|
|
|
|
else: libs_arch = arm-linux-androideabi
|
|
|
|
ARCHS += "$$emitString($$arch):$$emitString($$libs_arch)"
|
|
|
|
}
|
|
|
|
FILE_CONTENT += " \"architectures\": {$$join(ARCHS,", ")},"
|
2013-09-05 11:18:15 +00:00
|
|
|
|
2014-03-07 12:56:01 +00:00
|
|
|
# Explicitly set qt dependencies of application for deployment
|
2013-09-05 11:18:15 +00:00
|
|
|
!isEmpty(ANDROID_DEPLOYMENT_DEPENDENCIES): \
|
2013-10-07 20:42:11 +00:00
|
|
|
FILE_CONTENT += " \"deployment-dependencies\": $$emitString($$join(ANDROID_DEPLOYMENT_DEPENDENCIES, ",")),"
|
2013-09-05 11:18:15 +00:00
|
|
|
|
2014-03-07 12:56:01 +00:00
|
|
|
# Explicitly set external dependencies of application for deployment
|
|
|
|
!isEmpty(ANDROID_EXTRA_PLUGINS): \
|
|
|
|
FILE_CONTENT += " \"android-extra-plugins\": $$emitString($$join(ANDROID_EXTRA_PLUGINS, ",")),"
|
|
|
|
|
2013-09-05 11:18:15 +00:00
|
|
|
# Android-specific settings of Project
|
|
|
|
!isEmpty(ANDROID_PACKAGE_SOURCE_DIR): \
|
2013-10-07 20:42:11 +00:00
|
|
|
FILE_CONTENT += " \"android-package-source-directory\": $$emitString($$ANDROID_PACKAGE_SOURCE_DIR),"
|
2013-09-05 11:18:15 +00:00
|
|
|
|
2018-10-15 07:23:26 +00:00
|
|
|
# Android-specific version string
|
|
|
|
!isEmpty(ANDROID_VERSION_NAME): \
|
|
|
|
FILE_CONTENT += " \"android-version-name\": $$emitString($$ANDROID_VERSION_NAME),"
|
|
|
|
|
|
|
|
# Android-specific version number
|
|
|
|
!isEmpty(ANDROID_VERSION_CODE): \
|
|
|
|
FILE_CONTENT += " \"android-version-code\": $$emitString($$ANDROID_VERSION_CODE),"
|
|
|
|
|
2013-09-05 11:18:15 +00:00
|
|
|
!isEmpty(ANDROID_EXTRA_LIBS): \
|
2013-10-07 20:42:11 +00:00
|
|
|
FILE_CONTENT += " \"android-extra-libs\": $$emitString($$join(ANDROID_EXTRA_LIBS, ",")),"
|
2013-09-05 11:18:15 +00:00
|
|
|
|
2014-07-22 08:01:01 +00:00
|
|
|
!isEmpty(QML_IMPORT_PATH): \
|
|
|
|
FILE_CONTENT += " \"qml-import-paths\": $$emitString($$join(QML_IMPORT_PATH, ",")),"
|
|
|
|
|
|
|
|
isEmpty(QML_ROOT_PATH): \
|
|
|
|
QML_ROOT_PATH = $$_PRO_FILE_PWD_
|
|
|
|
FILE_CONTENT += " \"qml-root-path\": $$emitString($$QML_ROOT_PATH),"
|
2017-07-28 13:52:31 +00:00
|
|
|
FILE_CONTENT += " \"stdcpp-path\": $$emitString($$ANDROID_STDCPP_PATH),"
|
2019-08-01 05:56:59 +00:00
|
|
|
FILE_CONTENT += ""
|
|
|
|
FILE_CONTENT += " \"application-binary\": $$emitString($$TARGET)"
|
2013-09-05 11:18:15 +00:00
|
|
|
FILE_CONTENT += "}"
|
|
|
|
|
|
|
|
isEmpty(ANDROID_DEPLOYMENT_SETTINGS_FILE): ANDROID_DEPLOYMENT_SETTINGS_FILE = $$OUT_PWD/android-$$TARGET-deployment-settings.json
|
|
|
|
|
2016-07-14 14:50:02 +00:00
|
|
|
write_file($$ANDROID_DEPLOYMENT_SETTINGS_FILE, FILE_CONTENT)|error()
|
2013-09-05 11:18:15 +00:00
|
|
|
}
|
|
|
|
|