mirror of
https://github.com/QuasarApp/qt-android-cmake.git
synced 2025-04-26 13:44:35 +00:00
Use env var ANDROID_SDK or ANDROID_SDK_ROOT
Hello, I have noticed on two platforms (linux and mac) that your project asks for an environment variable ANDROID_SDK. However, after having installed "Android Studio + QtCreator + Android Sdk" on both platform, I noticed that an environment variable named ANDROID_SDK_ROOT was added automatically (without my intervention). I propose that AddQtAndroidApk could use indifferently $ENV{ANDROID_SDK} or ENV{ANDROID_SDK_ROOT}.
This commit is contained in:
parent
fc1dad67e9
commit
d4470e1680
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user