2016-11-21 06:17:47 +00:00
|
|
|
# qmake configuration for building with android-clang
|
2016-07-20 07:12:59 +00:00
|
|
|
MAKEFILE_GENERATOR = UNIX
|
|
|
|
QMAKE_PLATFORM = android
|
|
|
|
QMAKE_COMPILER = gcc clang llvm
|
|
|
|
|
2016-10-04 12:36:58 +00:00
|
|
|
CONFIG += android_install unversioned_soname unversioned_libname plugin_with_soname android_deployment_settings
|
2016-07-20 07:12:59 +00:00
|
|
|
|
|
|
|
include(../common/linux.conf)
|
2016-11-19 06:55:33 +00:00
|
|
|
include(../common/gcc-base-unix.conf)
|
2016-07-20 07:12:59 +00:00
|
|
|
include(../common/clang.conf)
|
2019-08-01 05:56:59 +00:00
|
|
|
|
|
|
|
load(device_config)
|
|
|
|
|
|
|
|
# In early configure setup; nothing useful to be done here.
|
|
|
|
isEmpty(DEFAULT_ANDROID_NDK_ROOT): return()
|
|
|
|
|
|
|
|
NDK_ROOT = $$(ANDROID_NDK_ROOT)
|
|
|
|
isEmpty(NDK_ROOT): NDK_ROOT = $$DEFAULT_ANDROID_NDK_ROOT
|
|
|
|
|
|
|
|
!exists($$NDK_ROOT): error("You need to set the ANDROID_NDK_ROOT environment variable to point to your Android NDK.")
|
|
|
|
|
|
|
|
NDK_HOST = $$(ANDROID_NDK_HOST)
|
|
|
|
isEmpty(NDK_HOST): NDK_HOST = $$DEFAULT_ANDROID_NDK_HOST
|
|
|
|
|
|
|
|
ANDROID_PLATFORM = $$(ANDROID_NDK_PLATFORM)
|
|
|
|
isEmpty(ANDROID_PLATFORM): ANDROID_PLATFORM = $$DEFAULT_ANDROID_PLATFORM
|
|
|
|
|
|
|
|
ANDROID_SDK_ROOT = $$(ANDROID_SDK_ROOT)
|
|
|
|
isEmpty(ANDROID_SDK_ROOT): ANDROID_SDK_ROOT = $$DEFAULT_ANDROID_SDK_ROOT
|
|
|
|
|
|
|
|
ANDROID_SDK_BUILD_TOOLS_REVISION = $$(ANDROID_BUILD_TOOLS_REVISION)
|
|
|
|
isEmpty(ANDROID_SDK_BUILD_TOOLS_REVISION) {
|
|
|
|
SDK_BUILD_TOOLS_REVISIONS = $$files($$ANDROID_SDK_ROOT/build-tools/*)
|
|
|
|
for (REVISION, SDK_BUILD_TOOLS_REVISIONS) {
|
|
|
|
BASENAME = $$basename(REVISION)
|
|
|
|
greaterThan(BASENAME, $$ANDROID_SDK_BUILD_TOOLS_REVISION): ANDROID_SDK_BUILD_TOOLS_REVISION = $$BASENAME
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-08-19 08:42:51 +00:00
|
|
|
ALL_ANDROID_ABIS = $$(ALL_ANDROID_ABIS)
|
|
|
|
isEmpty(ALL_ANDROID_ABIS): ALL_ANDROID_ABIS = $$DEFAULT_ANDROID_ABIS
|
|
|
|
isEmpty(ALL_ANDROID_ABIS): ALL_ANDROID_ABIS = arm64-v8a armeabi-v7a x86_64 x86
|
2019-08-01 05:56:59 +00:00
|
|
|
|
|
|
|
CONFIG += $$ANDROID_PLATFORM
|
|
|
|
|
2020-03-02 15:00:04 +00:00
|
|
|
ANDROID_MIN_SDK_VERSION = $$replace(ANDROID_PLATFORM, "android-", "")
|
2021-06-12 17:42:08 +00:00
|
|
|
ANDROID_TARGET_SDK_VERSION = 30
|
2020-03-02 15:00:04 +00:00
|
|
|
|
2019-08-27 09:43:23 +00:00
|
|
|
NDK_LLVM_PATH = $$NDK_ROOT/toolchains/llvm/prebuilt/$$NDK_HOST
|
|
|
|
QMAKE_CC = $$NDK_LLVM_PATH/bin/clang
|
|
|
|
QMAKE_CXX = $$NDK_LLVM_PATH/bin/clang++
|
|
|
|
QMAKE_LINK = $$QMAKE_CXX
|
|
|
|
QMAKE_OBJCOPY = $$NDK_LLVM_PATH/bin/llvm-objcopy
|
|
|
|
QMAKE_AR = $$NDK_LLVM_PATH/bin/llvm-ar cqs
|
|
|
|
QMAKE_OBJCOPY = $$NDK_LLVM_PATH/bin/llvm-objcopy
|
|
|
|
QMAKE_NM = $$NDK_LLVM_PATH/bin/llvm-nm -P
|
2016-07-20 07:12:59 +00:00
|
|
|
|
2019-08-01 05:56:59 +00:00
|
|
|
QMAKE_CFLAGS_OPTIMIZE = -Oz
|
|
|
|
QMAKE_CFLAGS_OPTIMIZE_FULL = -Oz
|
2019-07-09 07:34:31 +00:00
|
|
|
|
2019-08-01 05:56:59 +00:00
|
|
|
QMAKE_CFLAGS_WARN_ON = -Wall -W
|
|
|
|
QMAKE_CFLAGS_WARN_OFF =
|
|
|
|
QMAKE_CFLAGS_SHLIB = -fPIC
|
|
|
|
QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses
|
|
|
|
QMAKE_CFLAGS_THREAD = -D_REENTRANT
|
|
|
|
QMAKE_CFLAGS_HIDESYMS = -fvisibility=hidden
|
|
|
|
QMAKE_CFLAGS_NEON = -mfpu=neon
|
2019-01-28 15:04:21 +00:00
|
|
|
|
2019-10-22 09:41:26 +00:00
|
|
|
QMAKE_LFLAGS_APP = -Wl,--build-id=sha1 -Wl,--no-undefined -Wl,-z,noexecstack -shared
|
|
|
|
QMAKE_LFLAGS_SHLIB = -Wl,--build-id=sha1 -Wl,--no-undefined -Wl,-z,noexecstack -shared
|
2019-08-01 05:56:59 +00:00
|
|
|
QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB
|
|
|
|
QMAKE_LFLAGS_NOUNDEF = -Wl,--no-undefined
|
|
|
|
QMAKE_LFLAGS_RPATH = -Wl,-rpath=
|
|
|
|
QMAKE_LFLAGS_RPATHLINK = -Wl,-rpath-link=
|
2017-07-28 13:52:31 +00:00
|
|
|
|
2019-11-04 14:54:24 +00:00
|
|
|
equals(QMAKE_HOST.os, Windows) {
|
|
|
|
QMAKE_LINK_OBJECT_MAX = 10
|
|
|
|
}
|
|
|
|
|
2019-08-01 05:56:59 +00:00
|
|
|
QMAKE_LIBS_X11 =
|
|
|
|
QMAKE_LIBS_THREAD =
|
|
|
|
QMAKE_LIBS_OPENGL =
|
|
|
|
QMAKE_INCDIR_POST =
|
|
|
|
QMAKE_INCDIR_X11 =
|
|
|
|
QMAKE_LIBDIR_X11 =
|
|
|
|
QMAKE_INCDIR_OPENGL =
|
|
|
|
QMAKE_LIBDIR_OPENGL =
|
2018-10-01 12:46:46 +00:00
|
|
|
|
2018-11-02 09:41:32 +00:00
|
|
|
ANDROID_USE_LLVM = true
|
|
|
|
|
2019-08-01 05:56:59 +00:00
|
|
|
armeabi-v7a.sdk = armeabi-v7a
|
|
|
|
armeabi-v7a.target = armeabi-v7a
|
|
|
|
armeabi-v7a.dir_affix = armeabi-v7a
|
|
|
|
armeabi-v7a.CONFIG = armeabi-v7a
|
|
|
|
armeabi-v7a.deployment_identifier = armeabi-v7a
|
|
|
|
|
|
|
|
arm64-v8a.sdk = arm64-v8a
|
|
|
|
arm64-v8a.target = arm64-v8a
|
|
|
|
arm64-v8a.dir_affix = arm64-v8a
|
|
|
|
arm64-v8a.CONFIG = arm64-v8a
|
|
|
|
arm64-v8a.deployment_identifier = arm64-v8a
|
|
|
|
|
|
|
|
x86.sdk = x86
|
|
|
|
x86.target = x86
|
|
|
|
x86.dir_affix = x86
|
|
|
|
x86.CONFIG = x86
|
|
|
|
x86.deployment_identifier = x86
|
|
|
|
|
|
|
|
x86_64.sdk = x86_64
|
|
|
|
x86_64.target = x86_64
|
|
|
|
x86_64.dir_affix = x86_64
|
|
|
|
x86_64.CONFIG = x86_64
|
|
|
|
x86_64.deployment_identifier = x86_64
|
2017-07-28 13:52:31 +00:00
|
|
|
|
2019-08-01 05:56:59 +00:00
|
|
|
load(qt_config)
|