Merge pull request #37 from pthom/patch-1

Use env var ANDROID_SDK or ANDROID_SDK_ROOT
This commit is contained in:
Laurent Gomila 2020-05-13 17:47:38 +02:00 committed by GitHub
commit 250fdb2caa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -26,7 +26,10 @@ message(STATUS "Found Qt for Android: ${QT_ANDROID_QT_ROOT}")
if(NOT QT_ANDROID_SDK_ROOT)
set(QT_ANDROID_SDK_ROOT $ENV{ANDROID_SDK})
if(NOT QT_ANDROID_SDK_ROOT)
message(FATAL_ERROR "Could not find the Android SDK. Please set either the ANDROID_SDK environment variable, or the QT_ANDROID_SDK_ROOT CMake variable to the root directory of the Android SDK")
set(QT_ANDROID_SDK_ROOT $ENV{ANDROID_SDK_ROOT})
if(NOT QT_ANDROID_SDK_ROOT)
message(FATAL_ERROR "Could not find the Android SDK. Please set either the ANDROID_SDK environment variable, or the QT_ANDROID_SDK_ROOT CMake variable to the root directory of the Android SDK")
endif()
endif()
endif()
string(REPLACE "\\" "/" QT_ANDROID_SDK_ROOT ${QT_ANDROID_SDK_ROOT}) # androiddeployqt doesn't like backslashes in paths