Android: fix compile with NDK r18+

In NDK r18, libc++.so was renamed to libc++.so.XX where XX is the Android
API level.

[ChangeLog][Android] Fixed build issue with NDK r18+.

Task-number: QTBUG-70631
Change-Id: Id0d2955648197e3054e3c69263b5a90d57964f6c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Liang Qi <liang.qi@qt.io>
bb10
BogDan Vatra 2018-10-01 15:46:46 +03:00 committed by Liang Qi
parent 405c73e495
commit 56f949ad3c
1 changed files with 5 additions and 1 deletions

View File

@ -40,7 +40,11 @@ QMAKE_CFLAGS += -DANDROID_HAS_WSTRING --sysroot=$$NDK_ROOT/sysroot \
ANDROID_SOURCES_CXX_STL_LIBDIR = $$NDK_ROOT/sources/cxx-stl/llvm-libc++/libs/$$ANDROID_TARGET_ARCH
ANDROID_STDCPP_PATH = $$ANDROID_SOURCES_CXX_STL_LIBDIR/libc++_shared.so
ANDROID_CXX_STL_LIBS = -lc++
exists($$ANDROID_SOURCES_CXX_STL_LIBDIR/libc++.so): \
ANDROID_CXX_STL_LIBS = -lc++
else: \
ANDROID_CXX_STL_LIBS = $$ANDROID_SOURCES_CXX_STL_LIBDIR/libc++.so.$$replace(ANDROID_PLATFORM, "android-", "")
QMAKE_CFLAGS_OPTIMIZE_SIZE = -Oz