summaryrefslogtreecommitdiff
path: root/xmake/modules
diff options
context:
space:
mode:
authorruki <[email protected]>2018-12-07 00:54:03 +0800
committerruki <[email protected]>2018-12-06 23:24:51 +0800
commitb4f35402ca2a97708dc46f6e48d60a3f5bf02f5e (patch)
tree2295e9ccea8377ea90b9407edce14bdb443e9970 /xmake/modules
parentb03855d7dbc88bc38c07d7b62ea73de0dbbef9f6 (diff)
improve set_config
Diffstat (limited to 'xmake/modules')
-rw-r--r--xmake/modules/detect/sdks/find_ndk.lua2
-rw-r--r--xmake/modules/detect/sdks/find_xcode.lua2
2 files changed, 2 insertions, 2 deletions
diff --git a/xmake/modules/detect/sdks/find_ndk.lua b/xmake/modules/detect/sdks/find_ndk.lua
index 130ad220a..13909e2ce 100644
--- a/xmake/modules/detect/sdks/find_ndk.lua
+++ b/xmake/modules/detect/sdks/find_ndk.lua
@@ -153,7 +153,7 @@ function main(sdkdir, opt)
-- find ndk
local ndk = _find_ndk(sdkdir or config.get("ndk") or global.get("ndk"), arch, opt.sdkver or config.get("ndk_sdkver"), opt.toolchains_ver or config.get("ndk_toolchains_ver"))
- if ndk then
+ if ndk and ndk.sdkdir then
-- save to config
config.set("ndk", ndk.sdkdir, {force = true, readonly = true})
diff --git a/xmake/modules/detect/sdks/find_xcode.lua b/xmake/modules/detect/sdks/find_xcode.lua
index bf1e4f873..0a71f0d84 100644
--- a/xmake/modules/detect/sdks/find_xcode.lua
+++ b/xmake/modules/detect/sdks/find_xcode.lua
@@ -118,7 +118,7 @@ function main(sdkdir, opt)
-- find xcode
local xcode = _find_vscode(sdkdir or config.get("xcode") or global.get("xcode"), opt.sdkver or config.get("xcode_sdkver"), plat, arch)
- if xcode then
+ if xcode and xcode.sdkdir then
-- save to config
config.set("xcode", xcode.sdkdir, {force = true, readonly = true})