summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2019-11-23 15:08:38 +0800
committerGitHub <[email protected]>2019-11-23 15:08:38 +0800
commit38de0549ff18e026873537e23455a6408938ee61 (patch)
tree61c7427ec6d1ac0ab31f61cdd3a6b8cabe467c2c
parent434c6d5aed8cb6d2764a4b9f30bde35fc306bcb8 (diff)
parenta027cf0843001dd2cb608c1c42cf643f48a56749 (diff)
Merge pull request #625 from orzuk-lmj/dev
get correct windows sdk version for vsxmake plugin
-rw-r--r--xmake/plugins/project/vsxmake/getinfo.lua5
-rw-r--r--xmake/plugins/project/vsxmake/vsproj/templates/vcxproj/#target#.vcxproj1
2 files changed, 5 insertions, 1 deletions
diff --git a/xmake/plugins/project/vsxmake/getinfo.lua b/xmake/plugins/project/vsxmake/getinfo.lua
index 149df6721..4f9c4e5d6 100644
--- a/xmake/plugins/project/vsxmake/getinfo.lua
+++ b/xmake/plugins/project/vsxmake/getinfo.lua
@@ -141,6 +141,7 @@ function _make_targetinfo(mode, arch, target)
, arch = arch
, plat = config.get("plat")
, vsarch = (arch == "x86" and "Win32" or arch)
+ , sdkver = config.get("vs_sdkver")
}
-- write only if not default
@@ -344,7 +345,9 @@ function main(outputdir, vsinfo)
if tgtdir then _target.targetdir = path.relative(tgtdir, _target.vcxprojdir) end
_target._sub = _target._sub or {}
_target._sub[mode] = _target._sub[mode] or {}
- _target._sub[mode][arch] = _make_targetinfo(mode, arch, target)
+ local tgtinfo = _make_targetinfo(mode, arch, target)
+ _target._sub[mode][arch] = tgtinfo
+ _target.sdkver = tgtinfo.sdkver
-- save all sourcefiles and headerfiles
_target.sourcefiles = table.unique(table.join(_target.sourcefiles or {}, (target:sourcefiles())))
diff --git a/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj/#target#.vcxproj b/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj/#target#.vcxproj
index 9083dc278..323ed1a25 100644
--- a/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj/#target#.vcxproj
+++ b/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj/#target#.vcxproj
@@ -22,6 +22,7 @@
<XmakeProjectDir>#projectdir#</XmakeProjectDir>
<XmakeProjectFile>#projectfile#</XmakeProjectFile>
<XmakeTarget>#target#</XmakeTarget>
+ <WindowsTargetPlatformVersion>#sdkver#</WindowsTargetPlatformVersion>
</PropertyGroup>
<PropertyGroup Label="XmakeProgram">
<XmakeProgramDir Condition="'$(XmakeProgramDir)' == ''">$(XMAKE_PROGRAM_DIR)</XmakeProgramDir>