summaryrefslogtreecommitdiff
path: root/xmake/modules/detect/tools/find_sdcc.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2020-03-16 23:15:35 +0800
committerruki <[email protected]>2020-03-16 13:33:35 +0800
commite1806e88d3f161deaa89f912e7b27039810dded3 (patch)
treeb4b707833f8a6b922ec67f4bdb2832b62cc8578e /xmake/modules/detect/tools/find_sdcc.lua
parent719791f7eb2ebecf84ce2a182259b83219b5b773 (diff)
improve to find sdcc
Diffstat (limited to 'xmake/modules/detect/tools/find_sdcc.lua')
-rw-r--r--xmake/modules/detect/tools/find_sdcc.lua11
1 files changed, 9 insertions, 2 deletions
diff --git a/xmake/modules/detect/tools/find_sdcc.lua b/xmake/modules/detect/tools/find_sdcc.lua
index a57a343db..8c4e96d53 100644
--- a/xmake/modules/detect/tools/find_sdcc.lua
+++ b/xmake/modules/detect/tools/find_sdcc.lua
@@ -40,10 +40,17 @@ function main(opt)
opt = opt or {}
opt.command = opt.command or "--version"
- -- add search pathes (sdk/bin)
+ -- add search pathes
+ local pathes = {}
local bindir = get_config("bin")
if bindir and os.isdir(bindir) then
- opt.pathes = bindir
+ table.insert(pathes, bindir)
+ end
+ if is_host("windows") then
+ table.insert(pathes, "$(reg HKEY_LOCAL_MACHINE\\SOFTWARE\\WOW6432Node\\SDCC)\\bin")
+ end
+ if #pathes > 0 then
+ opt.pathes = pathes
end
-- find program