summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2019-10-12 21:26:37 +0800
committerruki <[email protected]>2019-10-12 21:26:37 +0800
commit2674a2bda8a09e0d58015d4a5498d8e5193ee703 (patch)
treeaf4cee1e5b8b6e2c203880b0d6c800e755a65cd1
parent700dff9d11d8aac51795c8c6c23eddc30284eeea (diff)
improve to find android ndk and sdk
-rw-r--r--xmake/modules/detect/sdks/find_android_sdk.lua2
-rw-r--r--xmake/modules/detect/sdks/find_ndk.lua2
2 files changed, 2 insertions, 2 deletions
diff --git a/xmake/modules/detect/sdks/find_android_sdk.lua b/xmake/modules/detect/sdks/find_android_sdk.lua
index 7c6cb5528..fae404473 100644
--- a/xmake/modules/detect/sdks/find_android_sdk.lua
+++ b/xmake/modules/detect/sdks/find_android_sdk.lua
@@ -31,7 +31,7 @@ function _find_android_sdkdir(sdkdir)
-- get sdk directory
if not sdkdir then
- sdkdir = os.getenv("ANDROID_SDK_ROOT")
+ sdkdir = os.getenv("ANDROID_SDK_HOME") or os.getenv("ANDROID_SDK_ROOT")
if not sdkdir and is_host("macosx") then
sdkdir = "~/Library/Android/sdk"
end
diff --git a/xmake/modules/detect/sdks/find_ndk.lua b/xmake/modules/detect/sdks/find_ndk.lua
index 512d1f1e3..4fc94de21 100644
--- a/xmake/modules/detect/sdks/find_ndk.lua
+++ b/xmake/modules/detect/sdks/find_ndk.lua
@@ -30,7 +30,7 @@ function _find_ndkdir(sdkdir)
-- get ndk directory
if not sdkdir then
- sdkdir = os.getenv("ANDROID_NDK_ROOT")
+ sdkdir = os.getenv("ANDROID_NDK_HOME") or os.getenv("ANDROID_NDK_ROOT")
if not sdkdir and is_host("macosx") then
sdkdir = "~/Library/Android/sdk/ndk-bundle"
end