Commit 8f7709cc authored by Drew's avatar Drew

Support C files

parent 08b64a0f
......@@ -696,7 +696,15 @@ struct PbxSourceFileReference: PbxprojSerializable {
buildFile = PbxBuildFile(path: path, fileRefGUID: guid)
}
func serialize() -> String {
var s = "\(guid) /* \(path) */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = \"\(path)\"; sourceTree = \"<group>\"; };\n"
let ext: String
if path.hasSuffix(".swift") {
ext = "swift"
}
else if path.hasSuffix(".c") {
ext = "c"
}
else { fatalError("Unknown extension for \(path)")}
var s = "\(guid) /* \(path) */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.\(ext); path = \"\(path)\"; sourceTree = \"<group>\"; };\n"
s += buildFile.serialize()
return s
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment