summaryrefslogtreecommitdiff
path: root/xmake/modules
diff options
context:
space:
mode:
authorruki <[email protected]>2026-02-11 00:06:24 +0800
committerruki <[email protected]>2026-02-11 00:06:24 +0800
commitf9a18b3ce8bac2a91f0975d2965d07b724524923 (patch)
tree30869204b5070532e1447d3e2cec17fa224e0adf /xmake/modules
parentee98b61be7054e1b8b8e2668b67c662ba12e264b (diff)
improve check tips
Diffstat (limited to 'xmake/modules')
-rw-r--r--xmake/modules/detect/sdks/find_android_sdk.lua9
-rw-r--r--xmake/modules/detect/sdks/find_mingw.lua4
-rw-r--r--xmake/modules/detect/sdks/find_ndk.lua9
-rw-r--r--xmake/modules/private/detect/find_platform.lua11
4 files changed, 23 insertions, 10 deletions
diff --git a/xmake/modules/detect/sdks/find_android_sdk.lua b/xmake/modules/detect/sdks/find_android_sdk.lua
index 24ea02c4c..c493ae6c7 100644
--- a/xmake/modules/detect/sdks/find_android_sdk.lua
+++ b/xmake/modules/detect/sdks/find_android_sdk.lua
@@ -110,14 +110,17 @@ function main(sdkdir, opt)
-- trace
if opt.verbose or option.get("verbose") then
- cprint("checking for Android SDK directory ... ${color.success}%s", sdk.sdkdir)
- cprint("checking for Build Tools Version of Android SDK ... ${color.success}%s", sdk.build_toolver)
+ local extra = ""
+ if sdk.build_toolver then
+ extra = " (buildtools: " .. sdk.build_toolver .. ")"
+ end
+ cprint("checking for Android SDK ... ${color.success}%s%s", sdk.sdkdir, extra)
end
else
-- trace
if opt.verbose or option.get("verbose") then
- cprint("checking for Android SDK directory ... ${color.nothing}${text.nothing}")
+ cprint("checking for Android SDK ... ${color.nothing}${text.nothing}")
end
end
diff --git a/xmake/modules/detect/sdks/find_mingw.lua b/xmake/modules/detect/sdks/find_mingw.lua
index 1d1c1fab1..bdf97983f 100644
--- a/xmake/modules/detect/sdks/find_mingw.lua
+++ b/xmake/modules/detect/sdks/find_mingw.lua
@@ -152,11 +152,11 @@ function main(sdkdir, opt)
if mingw and mingw.sdkdir then
config.set("mingw", mingw.sdkdir, {force = true, readonly = true})
if opt.verbose or option.get("verbose") then
- cprint("checking for mingw directory ... ${color.success}%s (%s)", mingw.sdkdir, mingw.cross)
+ cprint("checking for Mingw SDK ... ${color.success}%s (%s)", mingw.sdkdir, mingw.cross)
end
else
if opt.verbose or option.get("verbose") then
- cprint("checking for mingw directory ... ${color.nothing}${text.nothing}")
+ cprint("checking for Mingw SDK ... ${color.nothing}${text.nothing}")
end
end
diff --git a/xmake/modules/detect/sdks/find_ndk.lua b/xmake/modules/detect/sdks/find_ndk.lua
index 43d822845..628a76c41 100644
--- a/xmake/modules/detect/sdks/find_ndk.lua
+++ b/xmake/modules/detect/sdks/find_ndk.lua
@@ -302,12 +302,15 @@ function main(sdkdir, opt)
config.set("ndk_sdkver", ndk.sdkver, {force = true, readonly = true})
config.set("ndk_toolchains_ver", ndk.toolchains_ver, {force = true, readonly = true})
if opt.verbose or option.get("verbose") then
- cprint("checking for NDK directory ... ${color.success}%s", ndk.sdkdir)
- cprint("checking for SDK version of NDK ... ${color.success}%s", ndk.sdkver)
+ local extra = ""
+ if ndk.sdkver then
+ extra = " (sdk: " .. ndk.sdkver .. ")"
+ end
+ cprint("checking for Android NDK ... ${color.success}%s%s", ndk.sdkdir, extra)
end
else
if opt.verbose or option.get("verbose") then
- cprint("checking for NDK directory ... ${color.nothing}${text.nothing}")
+ cprint("checking for Android NDK ... ${color.nothing}${text.nothing}")
end
end
diff --git a/xmake/modules/private/detect/find_platform.lua b/xmake/modules/private/detect/find_platform.lua
index 6df2da9fe..a94b5ade3 100644
--- a/xmake/modules/private/detect/find_platform.lua
+++ b/xmake/modules/private/detect/find_platform.lua
@@ -145,19 +145,26 @@ function main(opt)
-- find platform
opt = opt or {}
local plat = _find_plat(opt.plat)
+ local will_set_plat = false
if opt.global then
if not opt.plat and not config.get("plat") then
+ will_set_plat = true
config.set("plat", plat)
- cprint("checking for platform ... ${color.success}%s", plat)
end
end
-- find architecture
local arch = _find_arch(plat, opt.arch)
+ local will_set_arch = false
if opt.global then
if not opt.arch and not config.get("arch") then
+ will_set_arch = true
config.set("arch", arch)
- cprint("checking for architecture ... ${color.success}%s", arch)
+ end
+ end
+ if opt.global then
+ if will_set_plat or will_set_arch then
+ cprint("checking for platform ... ${color.success}%s (%s)", plat, arch)
end
end
return plat, arch