summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2022-01-06 15:37:44 +0800
committerGitHub <[email protected]>2022-01-06 15:37:44 +0800
commit75a9e871ff9ffd073f78c0959de0b40952d5bec3 (patch)
treec3e6576f3b10a95265b381e238d140b1e33ad03a
parentc942938c04325e6c49d869fce4d15e69c351f516 (diff)
parent347f53abeb87def97c0e917a5cdebe6e616429ad (diff)
Merge pull request #1958 from yecate/dev
improve support find visualstudio buildtools
-rw-r--r--xmake/modules/detect/sdks/find_vstudio.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/xmake/modules/detect/sdks/find_vstudio.lua b/xmake/modules/detect/sdks/find_vstudio.lua
index 12feceaad..0b3fb1361 100644
--- a/xmake/modules/detect/sdks/find_vstudio.lua
+++ b/xmake/modules/detect/sdks/find_vstudio.lua
@@ -278,7 +278,8 @@ function main(opt)
local vswhere_VCAuxiliaryBuildDir = nil
if (tonumber(version) >= 15) and vswhere then
local vswhere_vrange = format("%s,%s)", version, (version + 1))
- local result = os.iorunv(vswhere.program, {"-prerelease", "-property", "installationpath", "-version", vswhere_vrange})
+ -- build tools: https://github.com/microsoft/vswhere/issues/22 @@ https://aka.ms/vs/workloads
+ local result = os.iorunv(vswhere.program, {"-products", "*", "-prerelease", "-property", "installationpath", "-version", vswhere_vrange})
if result then
vswhere_VCAuxiliaryBuildDir = path.join(result:trim(), "VC", "Auxiliary", "Build")
end