APK: Add check for SDK/NDK path

This commit is contained in:
Martchus 2018-12-02 21:36:50 +01:00
parent 3369ff8f6c
commit 530d61fc41
2 changed files with 8 additions and 1 deletions

View File

@ -9,7 +9,7 @@ set(META_APP_URL "https://github.com/${META_APP_AUTHOR}/${META_PROJECT_NAME}")
set(META_APP_DESCRIPTION "Common Qt related C++ classes and routines used by my applications such as dialogs, widgets and models")
set(META_VERSION_MAJOR 5)
set(META_VERSION_MINOR 12)
set(META_VERSION_PATCH 0)
set(META_VERSION_PATCH 1)
set(META_APP_VERSION ${META_VERSION_MAJOR}.${META_VERSION_MINOR}.${META_VERSION_PATCH})
# add project files

View File

@ -12,6 +12,13 @@ if(ANDROID_APK_CONFIGURED)
message(FATAL_ERROR "The AndroidApk module mustn't be included twice.")
endif()
if(NOT EXISTS "${CMAKE_ANDROID_SDK}")
message(FATAL_ERROR "CMAKE_ANDROID_SDK must contain the path of the Android SDK.")
endif()
if(NOT EXISTS "${CMAKE_ANDROID_NDK}")
message(FATAL_ERROR "CMAKE_ANDROID_NDK must contain the path of the Android NDK.")
endif()
# find "android" subdirectory in the source directory and check for AndroidManifest.xml
set(ANDROID_APK_SUBDIR "${CMAKE_CURRENT_SOURCE_DIR}/android")
if(NOT IS_DIRECTORY "${ANDROID_APK_SUBDIR}")