Improve compatibility with VS 201x Utility projects

This commit is contained in:
Jason Perkins 2014-07-14 16:48:03 -04:00
parent 7158f623b9
commit 8d206735b6
3 changed files with 52 additions and 33 deletions

View File

@ -139,16 +139,22 @@
--
m.elements.configurationProperties = function(cfg)
return {
m.configurationType,
m.useDebugLibraries,
m.useOfMfc,
m.useOfAtl,
m.clrSupport,
m.characterSet,
m.wholeProgramOptimization,
m.nmakeOutDirs,
}
if cfg.kind == p.UTILITY then
return {
m.configurationType,
}
else
return {
m.configurationType,
m.useDebugLibraries,
m.useOfMfc,
m.useOfAtl,
m.clrSupport,
m.characterSet,
m.wholeProgramOptimization,
m.nmakeOutDirs,
}
end
end
function m.configurationProperties(cfg)
@ -171,18 +177,26 @@
--
m.elements.outputProperties = function(cfg)
return {
m.propertyGroup,
m.linkIncremental,
m.ignoreImportLibrary,
m.outDir,
m.outputFile,
m.intDir,
m.targetName,
m.targetExt,
m.imageXexOutput,
m.generateManifest,
}
if cfg.kind == p.UTILITY then
return {
m.propertyGroup,
m.outDir,
m.intDir,
}
else
return {
m.propertyGroup,
m.linkIncremental,
m.ignoreImportLibrary,
m.outDir,
m.outputFile,
m.intDir,
m.targetName,
m.targetExt,
m.imageXexOutput,
m.generateManifest,
}
end
end
function m.outputProperties(cfg)
@ -224,15 +238,21 @@
--
m.elements.itemDefinitionGroup = function(cfg)
return {
m.clCompile,
m.resourceCompile,
m.link,
m.manifest,
m.buildEvents,
m.imageXex,
m.deploy,
}
if cfg.kind == p.UTILITY then
return {
}
else
return {
m.clCompile,
m.resourceCompile,
m.link,
m.manifest,
m.buildEvents,
m.imageXex,
m.deploy,
}
end
end
function m.itemDefinitionGroup(cfg)

View File

@ -37,6 +37,7 @@
premake.SHAREDLIB = "SharedLib"
premake.STATICLIB = "StaticLib"
premake.UNIVERSAL = "universal"
premake.UTILITY = "Utility"
premake.WINDOWEDAPP = "WindowedApp"
premake.WINDOWS = "windows"
premake.X32 = "x32"

View File

@ -237,8 +237,6 @@
test.capture [[
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Utility</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
]]
end