summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2018-06-28 00:16:13 +0800
committerruki <[email protected]>2018-06-27 19:37:22 +0800
commit3f353a69940ab45a9e0bf65369d82ee704f46da6 (patch)
tree86276c5bb942d00b3abc66db29869a85c836bb1b
parentce04ea485f463fea6374e8d952863a4a9332b7ca (diff)
fix find_vstudio bug
-rw-r--r--xmake/modules/detect/sdks/find_vstudio.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/xmake/modules/detect/sdks/find_vstudio.lua b/xmake/modules/detect/sdks/find_vstudio.lua
index a169b51a5..2778846b8 100644
--- a/xmake/modules/detect/sdks/find_vstudio.lua
+++ b/xmake/modules/detect/sdks/find_vstudio.lua
@@ -79,7 +79,9 @@ function _load_vcvarsall(vcvarsall, arch)
local WindowsSDKVersion = variables["WindowsSDKVersion"]
if WindowsSDKVersion then
WindowsSDKVersion = WindowsSDKVersion:gsub("\\", ""):trim()
- variables["WindowsSDKVersion"] = WindowsSDKVersion
+ if WindowsSDKVersion ~= "" then
+ variables["WindowsSDKVersion"] = WindowsSDKVersion
+ end
end
-- fix UCRTVersion
@@ -87,7 +89,7 @@ function _load_vcvarsall(vcvarsall, arch)
-- @note vcvarsall.bat maybe detect error if install WDK and SDK at same time (multi-sdk version exists in include directory).
--
local UCRTVersion = variables["UCRTVersion"]
- if UCRTVersion and UCRTVersion ~= WindowsSDKVersion then
+ if UCRTVersion and UCRTVersion ~= WindowsSDKVersion and WindowsSDKVersion ~= "" then
local lib = variables["lib"]
if lib then
lib = lib:gsub(UCRTVersion, WindowsSDKVersion)