From 1d4a5870e5beb566f29bc10d7cab4ec2a1772bcf Mon Sep 17 00:00:00 2001 From: ruki Date: Fri, 7 May 2021 00:32:45 +0800 Subject: improve find_vstudio --- xmake/modules/detect/sdks/find_vstudio.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- cgit v1.3.1