summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2021-05-07 00:32:45 +0800
committerruki <[email protected]>2021-05-07 00:32:45 +0800
commit1d4a5870e5beb566f29bc10d7cab4ec2a1772bcf (patch)
tree7a0089a09d3519a30ad87af106135c5bdb4ff7f8
parentf62bccb1945e89cc4f2e574b8ba29c5566ec197f (diff)
improve find_vstudio
-rw-r--r--xmake/modules/detect/sdks/find_vstudio.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/xmake/modules/detect/sdks/find_vstudio.lua b/xmake/modules/detect/sdks/find_vstudio.lua
index d908bcc5a..9af9fb730 100644
--- a/xmake/modules/detect/sdks/find_vstudio.lua
+++ b/xmake/modules/detect/sdks/find_vstudio.lua
@@ -223,7 +223,7 @@ function main(opt)
VCInstallDir
}
local vcvarsall = find_file("vcvarsall.bat", paths) or find_file("vcvars32.bat", paths)
- if vcvarsall and os.isfile(vcvarsall) then
+ if vcvarsall and os.isfile(vcvarsall) and vsvers[VisualStudioVersion] then
-- load vcvarsall
local vcvarsall_x86 = _load_vcvarsall(vcvarsall, VisualStudioVersion, "x86", opt)