qmake.conf 1.3 KB

123456789101112131415161718192021222324252627282930313233
  1. # qmake configuration for building with android-g++
  2. MAKEFILE_GENERATOR = UNIX
  3. QMAKE_PLATFORM = android
  4. QMAKE_COMPILER = gcc clang llvm
  5. CONFIG += android_install unversioned_soname unversioned_libname android_deployment_settings
  6. include(../common/linux.conf)
  7. include(../common/clang.conf)
  8. include(../common/android-base-head.conf)
  9. NDK_LLVM_PATH = $$NDK_ROOT/toolchains/llvm/prebuilt/$$NDK_HOST
  10. QMAKE_CC = $$NDK_LLVM_PATH/bin/clang
  11. QMAKE_CXX = $$NDK_LLVM_PATH/bin/clang++
  12. equals(ANDROID_TARGET_ARCH, armeabi-v7a): \
  13. QMAKE_CFLAGS = -target armv7-none-linux-androideabi
  14. else: equals(ANDROID_TARGET_ARCH, armeabi): \
  15. QMAKE_CFLAGS = -target armv5te-none-linux-androideabi
  16. else: equals(ANDROID_TARGET_ARCH, arm64-v8a): \
  17. QMAKE_CFLAGS = -target aarch64-none-linux-android
  18. else: equals(ANDROID_TARGET_ARCH, x86): \
  19. QMAKE_CFLAGS = -target i686-none-linux-android
  20. else: equals(ANDROID_TARGET_ARCH, x86_64): \
  21. QMAKE_CFLAGS = -target x86_64-none-linux-android
  22. else: equals(ANDROID_TARGET_ARCH, mips): \
  23. QMAKE_CFLAGS += -target mipsel-none-linux-android
  24. else: equals(ANDROID_TARGET_ARCH, mips64): \
  25. QMAKE_CFLAGS = -target mips64el-none-linux-android
  26. QMAKE_LINK = $$QMAKE_CXX $$QMAKE_CFLAGS -gcc-toolchain $$NDK_TOOLCHAIN_PATH
  27. include(../common/android-base-tail.conf)