Groups in XCode workspace working.
local p = premake
local m = p.modules.xcode
-
+ local tree = p.tree
---
end
function m.workspaceFileRefs(wks)
- for prj in p.workspace.eachproject(wks) do
+ local tr = p.workspace.grouptree(wks)
+ tree.traverse(tr, {
+ onleaf = function(n)
+ local prj = n.project
+
p.push('<FileRef')
local contents = p.capture(function()
p.callArray(m.elements.workspaceFileRef, prj)
end)
p.outln(contents .. ">")
p.pop('</FileRef>')
- end
- end
+ end,
+
+ onbranchenter = function(n)
+ local prj = n.project
+ p.push('<Group')
+ p.w('location = "container:"')
+ p.w('name = "%s">', n.name)
+ end,
+ onbranchexit = function(n)
+ p.pop('</Group>')
+ end,
+ })
+ end
---------------------------------------------------------------------------
--
