Fix to previous commit; adds back missing platform identifier to VS2010 configs (h/t Richard Sim)

This commit is contained in:
Jason Perkins 2011-12-15 14:14:26 -05:00
parent 5b6f8f6f36
commit eeff5330eb
2 changed files with 6 additions and 14 deletions

View File

@ -72,9 +72,9 @@
-- kind of binary it produces, and some global settings.
--
function vc2010.configurationPropertyGroup(cfg)
function vc2010.configurationPropertyGroup(cfg, cfginfo)
_p(1,'<PropertyGroup '..if_config_and_platform() ..' Label="Configuration">'
, premake.esc(cfg.name))
, premake.esc(cfginfo.name))
_p(2,'<ConfigurationType>%s</ConfigurationType>',vc2010.config_type(cfg))
_p(2,'<UseDebugLibraries>%s</UseDebugLibraries>', iif(optimisation(cfg) == "Disabled","true","false"))
_p(2,'<CharacterSet>%s</CharacterSet>',iif(cfg.flags.Unicode,"Unicode","MultiByte"))
@ -90,14 +90,6 @@
end
local function config_type_block(prj)
for _, cfginfo in ipairs(prj.solution.vstudio_configs) do
local cfg = premake.getconfig(prj, cfginfo.src_buildcfg, cfginfo.src_platform)
vc2010.configurationPropertyGroup(cfg)
end
end
local function import_props(prj)
for _, cfginfo in ipairs(prj.solution.vstudio_configs) do
local cfg = premake.getconfig(prj, cfginfo.src_buildcfg, cfginfo.src_platform)
@ -579,7 +571,7 @@
for _, cfginfo in ipairs(prj.solution.vstudio_configs) do
local cfg = premake.getconfig(prj, cfginfo.src_buildcfg, cfginfo.src_platform)
vc2010.configurationPropertyGroup(cfg)
vc2010.configurationPropertyGroup(cfg, cfginfo)
end
_p(1,'<Import Project="$(VCTargetsPath)\\Microsoft.Cpp.props" />')

View File

@ -24,7 +24,7 @@
premake.bake.buildconfigs()
sln.vstudio_configs = premake.vstudio.buildconfigs(sln)
cfg = premake.getconfig(prj, "Debug", platform)
vc2010.configurationPropertyGroup(cfg)
vc2010.configurationPropertyGroup(cfg, sln.vstudio_configs[1])
end
@ -37,7 +37,7 @@
flags { "MFC" }
prepare()
test.capture [[
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug'" Label="Configuration">
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet>
@ -50,7 +50,7 @@
flags { "MFC", "StaticRuntime" }
prepare()
test.capture [[
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug'" Label="Configuration">
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet>