Welcome to mirror list, hosted at ThFree Co, Russian Federation.

xcode4_workspace.lua « xcode « actions « src - github.com/windirstat/premake-4.x-stable.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: a17e654d4a3a683132b46cf72723f915ab54a1d1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
premake.xcode4 = {}

local xcode4 = premake.xcode4

function xcode4.workspace_head()
	_p('<?xml version="1.0" encoding="UTF-8"?>')
	_p('<Workspace')
		_p(1,'version = "1.0">')

end

function xcode4.workspace_tail()
	_p('</Workspace>')
end

function xcode4.workspace_file_ref(prj)

		local projpath = path.getrelative(prj.solution.location, prj.location)
		if projpath == '.' then projpath = '' 
		else projpath = projpath ..'/' 
		end
		_p(1,'<FileRef')
			_p(2,'location = "group:%s">',projpath .. prj.name .. '.xcodeproj')
		_p(1,'</FileRef>')
end

function xcode4.workspace_generate(sln)
	premake.xcode.preparesolution(sln)

	xcode4.workspace_head()

	for prj in premake.solution.eachproject(sln) do
		xcode4.workspace_file_ref(prj)
	end
	
	xcode4.workspace_tail()
end