A dummy CMakeLists.txt include the AddQtAndroidApk.cmake
file in order to include the macro with new CMake 3.11 feature FetchContent
include(FetchContent)
FetchContent_Declare(QtAndroidCMake
GIT_REPOSITORY "https://github.com/OlivierLDff/QtAndroidCMake"
GIT_TAG "v19.0.2"
)
FetchContent_MakeAvailable(QtAndroidCMake)
# Now add_qt_android_apk is available
add_qt_android_apk(YourTarget YourTargetApk)
Minor Change
- Refactor naming convention from UPPER_CASE to lower_case
- Remove endif(CONDITION) with just endif()
- Save bunch of crap in cache when include for later reuse (for FetchContent support)
Demo can be found in https://github.com/OlivierLDff/QQuickMaterialHelperGallery