diff --git a/modules/xcode/xcode4_workspace.lua b/modules/xcode/xcode4_workspace.lua
index 58bf0fd1..547e387f 100644
--- a/modules/xcode/xcode4_workspace.lua
+++ b/modules/xcode/xcode4_workspace.lua
@@ -8,7 +8,7 @@
local p = premake
local m = p.modules.xcode
-
+ local tree = p.tree
---
@@ -53,18 +53,33 @@
end
function m.workspaceFileRefs(wks)
- for prj in p.workspace.eachproject(wks) do
- p.push('")
- p.pop('')
- end
+ local tr = p.workspace.grouptree(wks)
+ tree.traverse(tr, {
+ onleaf = function(n)
+ local prj = n.project
+
+ p.push('")
+ p.pop('')
+ end,
+
+ onbranchenter = function(n)
+ local prj = n.project
+
+ p.push('', n.name)
+ end,
+
+ onbranchexit = function(n)
+ p.pop('')
+ end,
+ })
end
-
-
---------------------------------------------------------------------------
--
-- Handlers for individual project elements