summaryrefslogtreecommitdiff
path: root/xmake/modules/detect/tools
diff options
context:
space:
mode:
authorruki <[email protected]>2021-01-24 22:33:54 +0800
committerruki <[email protected]>2021-01-24 22:33:54 +0800
commit4e39a9f9da50f54eef30e289078d8794fd5d74ad (patch)
treecc42ac436f7a374116e0ff13bb3f6cb21b96ce9a /xmake/modules/detect/tools
parent80aa72c198b210343c37ecb7db584a700274a783 (diff)
remove environment
Diffstat (limited to 'xmake/modules/detect/tools')
-rw-r--r--xmake/modules/detect/tools/find_7z.lua6
-rw-r--r--xmake/modules/detect/tools/find_curl.lua6
2 files changed, 12 insertions, 0 deletions
diff --git a/xmake/modules/detect/tools/find_7z.lua b/xmake/modules/detect/tools/find_7z.lua
index 08c0d172b..a53ba4dc1 100644
--- a/xmake/modules/detect/tools/find_7z.lua
+++ b/xmake/modules/detect/tools/find_7z.lua
@@ -43,6 +43,12 @@ function main(opt)
opt.command = opt.command or "--help"
opt.parse = "(%d+%.?%d*)%s"
+ -- find 7z from builtin xmake/winenv
+ if is_host("windows") then
+ opt.paths = opt.paths or {}
+ table.insert(opt.paths, path.join(os.programdir(), "winenv", "bin"))
+ end
+
-- find program
local program = find_program(opt.program or "7z", opt)
if not program and not opt.program then
diff --git a/xmake/modules/detect/tools/find_curl.lua b/xmake/modules/detect/tools/find_curl.lua
index 7807a65a3..493264684 100644
--- a/xmake/modules/detect/tools/find_curl.lua
+++ b/xmake/modules/detect/tools/find_curl.lua
@@ -40,6 +40,12 @@ function main(opt)
-- init options
opt = opt or {}
+ -- find curl from builtin xmake/winenv
+ if is_host("windows") then
+ opt.paths = opt.paths or {}
+ table.insert(opt.paths, path.join(os.programdir(), "winenv", "bin"))
+ end
+
-- find program
local program = find_program(opt.program or "curl", opt)