Xcode4 workspace relative location paths and workspace generation
This commit is contained in:
parent
98b9815534
commit
a02fd77b74
@ -84,8 +84,8 @@
|
||||
default_platform = "Universal",
|
||||
|
||||
onsolution = function(sln)
|
||||
-- Assign IDs needed for inter-project dependencies
|
||||
premake.xcode.preparesolution(sln)
|
||||
--xcode4.workspace_generate(sln)
|
||||
premake.generate(sln, "%%.xcworkspace/contents.xcworkspacedata", premake.xcode4.workspace_generate)
|
||||
end,
|
||||
|
||||
onproject = function(prj)
|
||||
|
@ -16,7 +16,9 @@ end
|
||||
function xcode4.workspace_file_ref(prj)
|
||||
|
||||
local projpath = path.getrelative(prj.solution.location, prj.location)
|
||||
if projpath == '.' then projpath = '' end
|
||||
if projpath == '.' then projpath = ''
|
||||
else projpath = projpath ..'/'
|
||||
end
|
||||
_p(1,'<FileRef')
|
||||
_p(2,'location = "group:%s">',projpath .. prj.name .. '.xcodeproj')
|
||||
_p(1,'</FileRef>')
|
||||
|
@ -61,3 +61,11 @@
|
||||
.. CONSTANT_PROJECT_NAME .. '.xcodeproj'
|
||||
..'">%s+</FileRef>')
|
||||
end
|
||||
|
||||
function suite.pathPrefixAndProjectName_pathIsPathIsDifferentDir_pathPostfixSlashAdded()
|
||||
prj.location = "foo"
|
||||
local buffer = get_buffer()
|
||||
test.string_contains(buffer,'.*<FileRef%s+location = "group:'
|
||||
.. prj.location .. '/'.. CONSTANT_PROJECT_NAME .. '.xcodeproj'
|
||||
..'">%s+</FileRef>')
|
||||
end
|
Reference in New Issue
Block a user