summaryrefslogtreecommitdiff
path: root/xmake/plugins/project/vstudio/impl/vs200x_solution.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2016-08-29 12:02:02 +0800
committerruki <[email protected]>2016-08-29 12:02:02 +0800
commitc31f75567dc7946c78f25ecb043220934616b435 (patch)
tree8f7ab4411f22b16c44db02c0bd9111e6f664a023 /xmake/plugins/project/vstudio/impl/vs200x_solution.lua
parentbb3195b072a0568718f10be405423e3ad0153d4b (diff)
generate vs2013 project files
Diffstat (limited to 'xmake/plugins/project/vstudio/impl/vs200x_solution.lua')
-rwxr-xr-xxmake/plugins/project/vstudio/impl/vs200x_solution.lua11
1 files changed, 10 insertions, 1 deletions
diff --git a/xmake/plugins/project/vstudio/impl/vs200x_solution.lua b/xmake/plugins/project/vstudio/impl/vs200x_solution.lua
index ed9d0cdf2..b024cf9df 100755
--- a/xmake/plugins/project/vstudio/impl/vs200x_solution.lua
+++ b/xmake/plugins/project/vstudio/impl/vs200x_solution.lua
@@ -39,8 +39,14 @@ function _make_projects(slnfile, vsinfo)
-- make all targets
for targetname, target in pairs(project.targets()) do
+ -- the project suffix
+ local suffix = "vcproj"
+ if tonumber(vsinfo.vstudio_version) >= 2010 then
+ suffix = "vcxproj"
+ end
+
-- enter project
- slnfile:enter("Project(\"{%s}\") = \"%s\", \"%s\\%s.vcproj\", \"{%s}\"", vctool, targetname, targetname, targetname, os.uuid(targetname))
+ slnfile:enter("Project(\"{%s}\") = \"%s\", \"%s\\%s.%s\", \"{%s}\"", vctool, targetname, targetname, targetname, suffix, os.uuid(targetname))
-- add dependences
for _, dep in ipairs(target:get("deps")) do
@@ -91,6 +97,9 @@ function make(vsinfo)
-- open solution file
local slnfile = vsfile.open(path.join(vsinfo.solution_dir, vsinfo.solution_name .. ".sln"), "w")
+ -- init indent character
+ vsfile.indentchar('\t')
+
-- make header
_make_header(slnfile, vsinfo)