Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/windirstat/premake-4.x-stable.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/actions/vstudio/vs2010_vcxproj.lua')
-rw-r--r--src/actions/vstudio/vs2010_vcxproj.lua15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/actions/vstudio/vs2010_vcxproj.lua b/src/actions/vstudio/vs2010_vcxproj.lua
index 04deecd..0a6c4bc 100644
--- a/src/actions/vstudio/vs2010_vcxproj.lua
+++ b/src/actions/vstudio/vs2010_vcxproj.lua
@@ -576,12 +576,21 @@
io.eol = "\r\n"
_p('<?xml version="1.0" encoding="utf-8"?>')
- local t = ""
+ local action = premake.action.current()
+
+ local toolversion = ''
+ if (_ACTION >= "vs2010") and (_ACTION <= "vs2017") then
+ if action.vstudio.toolsVersion then
+ toolversion = string.format(' ToolsVersion="%s"', action.vstudio.toolsVersion)
+ end
+ end
+
+ local default_targets = ""
if targets then
- t = ' DefaultTargets="' .. targets .. '"'
+ default_targets = ' DefaultTargets="' .. targets .. '"'
end
- _p('<Project%s ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">', t)
+ _p('<Project%s%s xmlns="http://schemas.microsoft.com/developer/msbuild/2003">', default_targets, toolversion)
end