Merge pull request #855 from Blizzard/image-filter-vstudio

Add filter for <Image> files (#135)
This commit is contained in:
Tom van Dijck 2017-08-01 11:01:57 -07:00 committed by GitHub
commit 607353cf3d
2 changed files with 34 additions and 0 deletions

View File

@ -199,3 +199,16 @@
</ItemGroup>
]]
end
--
-- Check handling of image files
--
function suite.filerImage()
files { "hello.png" }
prepare()
test.capture [[
<ItemGroup>
<Image Include="hello.png" />
</ItemGroup>
]]
end

View File

@ -818,6 +818,27 @@
end
}
---
-- Image group
---
m.categories.Image = {
name = "Image",
extensions = { ".gif", ".jpg", ".jpe", ".png", ".bmp", ".dib", "*.tif", "*.wmf", "*.ras", "*.eps", "*.pcx", "*.pcd", "*.tga", "*.dds" },
priority = 8,
emitFiles = function(prj, group)
local fileCfgFunc = function(fcfg, condition)
return {
m.excludedFromBuild
}
end
m.emitFiles(prj, group, "Image", nil, fileCfgFunc)
end,
emitFilter = function(prj, group)
m.filterGroup(prj, group, "Image")
end
}
---
-- Categorize files into groups.