Add Metal shader files as source code

Xcode generally puts these in the Resources category so that's what I've
done, but I don't know if that's strictly necessary.
This commit is contained in:
Nick Gravelyn 2020-09-13 11:04:22 -07:00
parent 670935a23f
commit 78941e415b
2 changed files with 13 additions and 0 deletions

View File

@ -72,6 +72,17 @@
]]
end
function suite.PBXBuildFile_ListsMetalFileInResources()
files { "source.metal", "Info.plist" }
prepare()
xcode.PBXBuildFile(tr)
test.capture [[
/* Begin PBXBuildFile section */
3873A08432355CF66C345EC4 /* source.metal in Resources */ = {isa = PBXBuildFile; fileRef = 35B2856C7E23699EC2C23BAC /* source.metal */; };
/* End PBXBuildFile section */
]]
end
function suite.PBXBuildFile_ListsResourceFilesOnlyOnceWithGroupID()
files { "English.lproj/MainMenu.xib", "French.lproj/MainMenu.xib" }
prepare()

View File

@ -42,6 +42,7 @@
[".s"] = "Sources",
[".S"] = "Sources",
[".swift"] = "Sources",
[".metal"] = "Resources",
}
if node.isResource then
return "Resources"
@ -142,6 +143,7 @@
[".wav"] = "audio.wav",
[".xcassets"] = "folder.assetcatalog",
[".swift"] = "sourcecode.swift",
[".metal"] = "sourcecode.metal",
}
return types[path.getextension(node.path)] or "text"
end