diff options
| author | Roy Ivy III <[email protected]> | 2018-10-14 22:12:22 -0500 |
|---|---|---|
| committer | Roy Ivy III <[email protected]> | 2018-10-15 21:59:32 -0500 |
| commit | 19829f49a644d4377c082df90b812a891d4d403c (patch) | |
| tree | 671f1988136bc113bc64a0ee0b27e47d4103aeea | |
| parent | e97e34938bdace77ff10dcd933f2af961432949d (diff) | |
fix "fix UCRTVersion" logic for possibly missing WindowsSDKVersion
* some versions (especially early versions) of MSVC/VS may not define the WindowsSDKVersion environment variable
| -rw-r--r-- | xmake/modules/detect/sdks/find_vstudio.lua | 2 |
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 2e8083768..5ed3b310c 100644 --- a/xmake/modules/detect/sdks/find_vstudio.lua +++ b/xmake/modules/detect/sdks/find_vstudio.lua @@ -93,7 +93,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 and WindowsSDKVersion ~= "" then + if UCRTVersion and WindowsSDKVersion and UCRTVersion ~= WindowsSDKVersion and WindowsSDKVersion ~= "" then local lib = variables["lib"] if lib then lib = lib:gsub(UCRTVersion, WindowsSDKVersion) |
