3157645: Respects full path for xcode frameworks

This commit is contained in:
Liam Devine 2011-03-23 15:00:51 +00:00
parent db972589b1
commit 801808062d
3 changed files with 37 additions and 2 deletions

View File

@ -9,6 +9,7 @@
* Bug 3135734: Remove WholeProgramOptimization setting in vs10 (doug)
* Bug 3138377: Link dependencies ignored within "SharedLib" configuration
* Bug 3163703: pdb file being set in the wrong section. (hodsondd)
* Bug 3157645: Full path for xcode frameworks
-------
4.3

View File

@ -313,8 +313,16 @@
else
local pth, src
if xcode.isframework(node.path) then
-- I need to figure out how to locate frameworks; this is just to get something working
pth = "/System/Library/Frameworks/" .. node.path
--respect user supplied paths
if string.find(node.path,'/') then
io.write(node.path .. '\n')
if string.find(node.path,'^%.')then
error('relative paths are not currently supported for frameworks')
end
pth = node.path
else
pth = "/System/Library/Frameworks/" .. node.path
end
src = "absolute"
else
-- something else; probably a source code file

View File

@ -177,6 +177,32 @@
[Cocoa.framework] /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = "Cocoa.framework"; path = "/System/Library/Frameworks/Cocoa.framework"; sourceTree = "<absolute>"; };
]]
end
function suite.PBXFileReference_leavesFrameWorkLocationsAsIsWhenSupplied_pathIsSetToInput()
local inputFrameWork = 'somedir/Foo.framework'
links(inputFrameWork)
prepare()
io.capture()
xcode.PBXFileReference(tr)
local buffer = io.endcapture()
test.string_contains(buffer,'path = "'..inputFrameWork..'"')
end
function suite.PBXFileReference_relativeFrameworkPathSupplied_callsError()
local inputFrameWork = '../somedir/Foo.framework'
links(inputFrameWork)
prepare()
local error_called = false
local old_error = error
error = function( ... )error_called = true end
xcode.PBXFileReference(tr)
error = old_error
test.istrue(error_called)
end
function suite.PBXFileReference_ListsIconFiles()
files { "Icon.icns" }