summaryrefslogtreecommitdiff
path: root/xmake/modules/detect/tools
diff options
context:
space:
mode:
authorruki <[email protected]>2020-12-14 22:39:29 +0800
committerruki <[email protected]>2020-12-14 22:39:29 +0800
commit4030bf655cd5bbf3af26b682078f4354eb2cb86c (patch)
tree5e860e3c4abd5769489de9d6dcae6d514d29e03c /xmake/modules/detect/tools
parent007b2200be5b2a8e5d784829782b56793e93e572 (diff)
remove __vcvarsall
Diffstat (limited to 'xmake/modules/detect/tools')
-rw-r--r--xmake/modules/detect/tools/find_devenv.lua12
1 files changed, 7 insertions, 5 deletions
diff --git a/xmake/modules/detect/tools/find_devenv.lua b/xmake/modules/detect/tools/find_devenv.lua
index 745c26099..1111c92a3 100644
--- a/xmake/modules/detect/tools/find_devenv.lua
+++ b/xmake/modules/detect/tools/find_devenv.lua
@@ -20,6 +20,7 @@
-- imports
import("core.project.config")
+import("core.tool.toolchain")
-- find devenv
--
@@ -48,11 +49,12 @@ function main(opt)
-- e.g. C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE
--
local program = nil
- local vcvarsall = config.get("__vcvarsall")
- if vcvarsall then
- for _, vsvars in pairs(vcvarsall) do
- if vsvars.DevEnvdir and os.isexec(path.join(vsvars.DevEnvdir, "devenv.exe")) then
- program = path.join(vsvars.DevEnvdir, "devenv.exe")
+ local msvc = toolchain.load("msvc")
+ if msvc then
+ local vcvars = msvc:config("vcvars")
+ if vcvars then
+ if vcvars.DevEnvdir and os.isexec(path.join(vcvars.DevEnvdir, "devenv.exe")) then
+ program = path.join(vcvars.DevEnvdir, "devenv.exe")
end
end
end