Android Ndk r19 fix
Major thanks to freekee1 works (LaurentGomila#27)
Fixes
- Number version now match android ndk version.
- Only
c++_shared
is now supported. - Replace the use of LOCATION properties by generator expressions to acquire dependency target locations.
- Add an extra file(GENERATOR) call to evaluate generator expressions at build time.
- Added support for the LLVM/clang toolchain. Since NDK r19, it seems to be the default and androiddeployqt fails when trying to use the gcc tool and toolchain paths.
Example
# armv7 cmake command example
cmake -DCMAKE_PREFIX_PATH=C:/Qt/5.12.1/android_armv7 \
-G "Unix Makefiles" \
-DANDROID_ABI=armeabi-v7a \
-DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK/build/cmake/android.toolchain.cmake \
-DANDROID_NATIVE_API_LEVEL=27 \
-DANDROID_STL=c++_shared \
-DANDROID_TOOLCHAIN=clang \
-DCMAKE_BUILD_TYPE=Release \
..
Tested with
- Windows 1803
- Qt 12.1
- Android ndk r19