Add support for kind="list:path" in rule properties. (#553)

This commit is contained in:
Tom van Dijck 2016-08-01 14:40:40 -07:00 committed by GitHub
parent 48bf0a2b5e
commit 9f67feb923
3 changed files with 9 additions and 4 deletions

View File

@ -154,9 +154,9 @@
function m.dependsOn(r)
p.w('<%sDependsOn', r.name)
p.w(' Condition="\'$(ConfigurationType)\' != \'Makefile\'">_SelectedFiles;$(%sDependsOn)</%sDependsOn>',
r.name, r.name, r.name)
p.w('<%sDependsOn', r.name)
p.w(' Condition="\'$(ConfigurationType)\' != \'Makefile\'">_SelectedFiles;$(%sDependsOn)</%sDependsOn>',
r.name, r.name, r.name)
end

View File

@ -119,6 +119,8 @@
m.stringListProperty(def)
elseif type(def.values) == "table" then
m.enumProperty(def)
elseif def.kind:startswith("list:") then
m.stringListProperty(def)
else
m.stringProperty(def)
end

View File

@ -523,11 +523,14 @@
local fld = p.rule.getPropertyField(rule, prop)
local value = cfg[fld.name]
if value ~= nil then
if fld.kind == "path" then
if fld.kind == "list:path" then
value = table.concat(vstudio.path(cfg, value), ';')
elseif fld.kind == "path" then
value = vstudio.path(cfg, value)
else
value = p.rule.getPropertyString(rule, prop, value)
end
if value ~= nil and #value > 0 then
m.element(prop.name, nil, '%s', value)
end