Fixed Xcode3 bug with sources in a subdirectory and grouped in virtual path
This commit is contained in:
parent
112483417b
commit
b101ac117a
@ -325,8 +325,15 @@
|
||||
src = "absolute"
|
||||
else
|
||||
-- something else; probably a source code file
|
||||
pth = tree.getlocalpath(node)
|
||||
src = "group"
|
||||
|
||||
-- if the parent node is virtual, it won't have a local path
|
||||
-- of its own; need to use full relative path from project
|
||||
if node.parent.isvpath then
|
||||
pth = node.cfg.name
|
||||
else
|
||||
pth = tree.getlocalpath(node)
|
||||
end
|
||||
end
|
||||
|
||||
_p(2,'%s /* %s */ = {isa = PBXFileReference; lastKnownFileType = %s; name = "%s"; path = "%s"; sourceTree = "<%s>"; };',
|
||||
|
@ -56,8 +56,3 @@ local vc200x = premake.vstudio.vc200x
|
||||
</Filter>
|
||||
]]
|
||||
end
|
||||
|
||||
|
||||
-- TODO: should be NO filter, with uuid
|
||||
-- can I tell if this is a virtual folder by munging the path?
|
||||
-- can I build that feature into the source tree?
|
@ -156,6 +156,7 @@
|
||||
]]
|
||||
end
|
||||
|
||||
|
||||
function suite.PBXFileReference_ListsXibCorrectly()
|
||||
files { "English.lproj/MainMenu.xib", "French.lproj/MainMenu.xib" }
|
||||
prepare()
|
||||
@ -191,7 +192,7 @@
|
||||
end
|
||||
|
||||
|
||||
function suite.PBXFileReference_leavesFrameWorkLocationsAsIsWhenSupplied_pathIsSetToInput()
|
||||
function suite.PBXFileReference_leavesFrameworkLocationsAsIsWhenSupplied_pathIsSetToInput()
|
||||
local inputFrameWork = 'somedir/Foo.framework'
|
||||
links(inputFrameWork)
|
||||
prepare()
|
||||
@ -252,6 +253,18 @@
|
||||
end
|
||||
|
||||
|
||||
function suite.PBXFileReference_UsesFullPath_WhenParentIsVirtual()
|
||||
files { "src/source.c" }
|
||||
vpaths { ["Source Files"] = "**.c" }
|
||||
prepare()
|
||||
xcode.PBXFileReference(tr)
|
||||
test.capture [[
|
||||
/* Begin PBXFileReference section */
|
||||
[source.c] /* source.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = "source.c"; path = "src/source.c"; sourceTree = "<group>"; };
|
||||
]]
|
||||
end
|
||||
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
-- PBXFrameworksBuildPhase tests
|
||||
---------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user