2013-03-04 09:16:42 +00:00
|
|
|
# qmake configuration for building with android-g++
|
2013-03-19 01:57:31 +00:00
|
|
|
MAKEFILE_GENERATOR = UNIX
|
|
|
|
QMAKE_PLATFORM = android
|
|
|
|
QMAKE_COMPILER = gcc
|
2013-03-04 09:16:42 +00:00
|
|
|
|
2016-10-04 12:36:58 +00:00
|
|
|
CONFIG += android_install unversioned_soname unversioned_libname plugin_with_soname android_deployment_settings
|
2013-03-04 09:16:42 +00:00
|
|
|
|
|
|
|
include(../common/linux.conf)
|
|
|
|
include(../common/gcc-base-unix.conf)
|
2016-07-20 07:12:59 +00:00
|
|
|
include(../common/android-base-head.conf)
|
2013-03-04 09:16:42 +00:00
|
|
|
|
2017-08-30 11:39:54 +00:00
|
|
|
QMAKE_CC = $${CROSS_COMPILE}gcc
|
|
|
|
QMAKE_CXX = $${CROSS_COMPILE}g++
|
2017-07-28 13:52:31 +00:00
|
|
|
QMAKE_LINK = $$QMAKE_CXX
|
2013-08-28 13:09:08 +00:00
|
|
|
|
2017-07-28 13:52:31 +00:00
|
|
|
ANDROID_SOURCES_CXX_STL_LIBDIR = $$NDK_ROOT/sources/cxx-stl/gnu-libstdc++/$$NDK_TOOLCHAIN_VERSION/libs/$$ANDROID_TARGET_ARCH
|
|
|
|
ANDROID_STDCPP_PATH = $$ANDROID_SOURCES_CXX_STL_LIBDIR/libgnustl_shared.so
|
|
|
|
ANDROID_CXX_STL_LIBS = -lgnustl_shared -lgcc
|
2018-11-02 09:41:32 +00:00
|
|
|
ANDROID_USE_LLVM = false
|
2017-07-28 13:52:31 +00:00
|
|
|
|
2017-09-07 07:48:45 +00:00
|
|
|
exists($$NDK_ROOT/sysroot/usr/include): \
|
|
|
|
QMAKE_CFLAGS += --sysroot=$$NDK_ROOT/sysroot \
|
|
|
|
-isystem $$NDK_ROOT/sysroot/usr/include/$$NDK_TOOLS_PREFIX
|
|
|
|
else: QMAKE_CFLAGS += --sysroot=$$ANDROID_PLATFORM_ROOT_PATH
|
|
|
|
|
|
|
|
QMAKE_CFLAGS += -isystem $$NDK_ROOT/sources/cxx-stl/gnu-libstdc++/$$NDK_TOOLCHAIN_VERSION/include \
|
2017-07-28 13:52:31 +00:00
|
|
|
-isystem $$ANDROID_SOURCES_CXX_STL_LIBDIR/include
|
|
|
|
|
|
|
|
equals(ANDROID_TARGET_ARCH, armeabi)|equals(ANDROID_TARGET_ARCH, armeabi-v7a): \
|
|
|
|
LIBGCC_PATH_FULL = $$system("$$QMAKE_CXX -mthumb-interwork -print-libgcc-file-name")
|
|
|
|
else: \
|
|
|
|
LIBGCC_PATH_FULL = $$system("$$QMAKE_CXX -print-libgcc-file-name")
|
|
|
|
ANDROID_SOURCES_CXX_STL_LIBDIR += $$dirname(LIBGCC_PATH_FULL)
|
|
|
|
|
2016-07-20 07:12:59 +00:00
|
|
|
include(../common/android-base-tail.conf)
|