diff options
author | liamDevine <none@none> | 2010-07-27 19:24:00 +0400 |
---|---|---|
committer | liamDevine <none@none> | 2010-07-27 19:24:00 +0400 |
commit | 2ab9fc5f33812f6effe7e7a8fffcd04eee125276 (patch) | |
tree | c65c844cf9aec25fbd3213a606af4e3924c5c8ee | |
parent | ee37f9eb15a23810ec7493b1d3fd0314658bd645 (diff) |
Added config_type to the namespace premake.vstudio.vs10_helpers from local scope
Fixed config_type not returning Application for a WindowedApp
-rw-r--r-- | src/actions/vstudio/vs2010_vcxproxj.lua | 7 | ||||
-rw-r--r-- | tests/actions/vstudio/test_vs2010_project_kinds.lua | 6 |
2 files changed, 10 insertions, 3 deletions
diff --git a/src/actions/vstudio/vs2010_vcxproxj.lua b/src/actions/vstudio/vs2010_vcxproxj.lua index e2b25bc..f2b2333 100644 --- a/src/actions/vstudio/vs2010_vcxproxj.lua +++ b/src/actions/vstudio/vs2010_vcxproxj.lua @@ -122,12 +122,13 @@ local vs10_helpers = premake.vstudio.vs10_helpers _p(1,'</PropertyGroup>') end - local function config_type(config) + function vs10_helpers.config_type(config) local t = { SharedLib = "DynamicLibrary", StaticLib = "StaticLibrary", - ConsoleApp = "Application", + ConsoleApp = "Application",
+ WindowedApp = "Application" } return t[config.kind] end @@ -155,7 +156,7 @@ local vs10_helpers = premake.vstudio.vs10_helpers local cfg = premake.getconfig(prj, cfginfo.src_buildcfg, cfginfo.src_platform)
_p(1,'<PropertyGroup '..if_config_and_platform() ..'\'==\'%s\'" Label="Configuration">'
, premake.esc(cfginfo.name)) - _p(2,'<ConfigurationType>%s</ConfigurationType>',config_type(cfg))
+ _p(2,'<ConfigurationType>%s</ConfigurationType>',vs10_helpers.config_type(cfg))
_p(2,'<CharacterSet>%s</CharacterSet>',iif(cfg.flags.Unicode,"Unicode","MultiByte"))
if cfg.flags.MFC then
diff --git a/tests/actions/vstudio/test_vs2010_project_kinds.lua b/tests/actions/vstudio/test_vs2010_project_kinds.lua index 0a19b49..80a3ba0 100644 --- a/tests/actions/vstudio/test_vs2010_project_kinds.lua +++ b/tests/actions/vstudio/test_vs2010_project_kinds.lua @@ -151,4 +151,10 @@ shared lib missing <ImportLibrary>???</ImportLibrary> in link section when noIn local buffer = get_buffer()
test.string_does_not_contain(buffer,'<ClCompile>.*<AdditionalIncludeDirectories>.*</ClCompile>')
end
+
+ function vs10_project_kinds.configType_configIsWindowedApp_resultComparesEqualToApplication()
+ local t = { kind = "WindowedApp"}
+ local result = premake.vstudio.vs10_helpers.config_type(t)
+ test.isequal('Application',result)
+ end
\ No newline at end of file |