mirror of
https://github.com/bkaradzic/bx.git
synced 2026-02-17 20:52:37 +01:00
Fixed windows sdk version selection.
This commit is contained in:
@@ -185,9 +185,11 @@ function toolchain(_buildDir, _libDir)
|
|||||||
tvosPlatform = _OPTIONS["with-tvos"]
|
tvosPlatform = _OPTIONS["with-tvos"]
|
||||||
end
|
end
|
||||||
|
|
||||||
local windowsPlatform = string.gsub(os.getenv("WindowsSDKVersion") or "8.1", "\\", "")
|
local windowsPlatform = nil
|
||||||
if _OPTIONS["with-windows"] then
|
if _OPTIONS["with-windows"] then
|
||||||
windowsPlatform = _OPTIONS["with-windows"]
|
windowsPlatform = _OPTIONS["with-windows"]
|
||||||
|
elseif nil ~= os.getenv("WindowsSDKVersion") then
|
||||||
|
windowsPlatform = string.gsub(os.getenv("WindowsSDKVersion"), "\\", "")
|
||||||
end
|
end
|
||||||
|
|
||||||
local compiler32bit = false
|
local compiler32bit = false
|
||||||
@@ -411,8 +413,10 @@ function toolchain(_buildDir, _libDir)
|
|||||||
then
|
then
|
||||||
|
|
||||||
local action = premake.action.current()
|
local action = premake.action.current()
|
||||||
action.vstudio.windowsTargetPlatformVersion = windowsPlatform
|
if nil ~= windowsPlatform then
|
||||||
action.vstudio.windowsTargetPlatformMinVersion = windowsPlatform
|
action.vstudio.windowsTargetPlatformVersion = windowsPlatform
|
||||||
|
action.vstudio.windowsTargetPlatformMinVersion = windowsPlatform
|
||||||
|
end
|
||||||
|
|
||||||
if (_ACTION .. "-clang") == _OPTIONS["vs"] then
|
if (_ACTION .. "-clang") == _OPTIONS["vs"] then
|
||||||
if "vs2017-clang" == _OPTIONS["vs"] then
|
if "vs2017-clang" == _OPTIONS["vs"] then
|
||||||
|
|||||||
Reference in New Issue
Block a user