summaryrefslogtreecommitdiff
path: root/xmake/modules/detect
diff options
context:
space:
mode:
authorstar9029 <[email protected]>2024-11-15 20:59:01 +0800
committerstar9029 <[email protected]>2024-11-15 20:59:01 +0800
commite126a59290cf409e064fe970b62ed2aec125c25f (patch)
tree9f3674f0f8333cb6a2e1c582f840d6b3c094eeff /xmake/modules/detect
parent5951d423b1c67187c47dbfd381b5c2fe9e8315a2 (diff)
support msvc-wine
Diffstat (limited to 'xmake/modules/detect')
-rw-r--r--xmake/modules/detect/sdks/find_vstudio.lua14
1 files changed, 9 insertions, 5 deletions
diff --git a/xmake/modules/detect/sdks/find_vstudio.lua b/xmake/modules/detect/sdks/find_vstudio.lua
index 1c4e905c8..b65f5e660 100644
--- a/xmake/modules/detect/sdks/find_vstudio.lua
+++ b/xmake/modules/detect/sdks/find_vstudio.lua
@@ -189,12 +189,16 @@ function find_build_tools(opt)
VSCMD_ARG_HOST_ARCH = "x64",
}
+ local buidl_tools_bin = {}
local host_dir = "Host" .. vcvars.VSCMD_ARG_HOST_ARCH
- local buidl_tools_bin = {
- path.join(vcvars.VCToolsInstallDir, "bin", host_dir, target_arch),
- path.join(vcvars.WindowsSDKDir, "bin", WindowsSDKVersion),
- path.join(vcvars.WindowsSDKDir, "bin", WindowsSDKVersion, "ucrt"),
- }
+ if is_host("windows") then
+ table.insert(buidl_tools_bin, path.join(vcvars.VCToolsInstallDir, "bin", host_dir, target_arch))
+ table.insert(buidl_tools_bin, path.join(vcvars.WindowsSDKDir, "bin", WindowsSDKVersion))
+ table.insert(buidl_tools_bin, path.join(vcvars.WindowsSDKDir, "bin", WindowsSDKVersion, "ucrt"))
+ elseif is_host("linux") then
+ -- for msvc-wine
+ table.insert(buidl_tools_bin, path.join(sdkdir, "bin", target_arch))
+ end
vcvars.VSCMD_ARG_TGT_ARCH = target_arch
vcvars.LIB = path.joinenv(lib)