Add <ProjectName> to VS 2010 projects when project and file names differ
This commit is contained in:
parent
8d76cc55dd
commit
89a85f0250
@ -154,6 +154,7 @@
|
||||
end
|
||||
end
|
||||
|
||||
vc2010.projectName(prj)
|
||||
_p(1,'</PropertyGroup>')
|
||||
end
|
||||
|
||||
@ -981,6 +982,13 @@
|
||||
end
|
||||
|
||||
|
||||
function vc2010.projectName(prj)
|
||||
if prj.name ~= prj.filename then
|
||||
_x(2,'<ProjectName>%s</ProjectName>', prj.name)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
function vc2010.propertyGroup(cfg, label)
|
||||
local cond
|
||||
if cfg then
|
||||
|
@ -108,3 +108,22 @@
|
||||
</PropertyGroup>
|
||||
]]
|
||||
end
|
||||
|
||||
|
||||
---
|
||||
-- If the project name differs from the project filename, output a
|
||||
-- <ProjectName> element to indicate that.
|
||||
---
|
||||
|
||||
function suite.addsFilename_onDifferentFilename()
|
||||
filename "MyProject_2012"
|
||||
prepare()
|
||||
test.capture [[
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{42B5DBC6-AE1F-903D-F75D-41E363076E92}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>MyProject</RootNamespace>
|
||||
<ProjectName>MyProject</ProjectName>
|
||||
</PropertyGroup>
|
||||
]]
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user