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

codeblocks_workspace.lua « codeblocks « actions « src - github.com/windirstat/premake-4.x-stable.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 4a01a467b8bf8dd9671274b3b9f8187ee757d367 (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
--
-- codeblocks_workspace.lua
-- Generate a Code::Blocks workspace.
-- Copyright (c) 2009 Jason Perkins and the Premake project
--

	function premake.codeblocks.workspace(sln)
		_p('<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>')
		_p('<CodeBlocks_workspace_file>')
		_p(1,'<Workspace title="%s">', sln.name)
		
		for prj in premake.solution.eachproject(sln) do
			local fname = path.join(path.getrelative(sln.location, prj.location), prj.name)
			local active = iif(prj.project == sln.projects[1], ' active="1"', '')
			
			_p(2,'<Project filename="%s.cbp"%s>', fname, active)
			for _,dep in ipairs(premake.getdependencies(prj)) do
				_p(3,'<Depends filename="%s.cbp" />', path.join(path.getrelative(sln.location, dep.location), dep.name))
			end
		
			_p(2,'</Project>')
		end
		
		_p(1,'</Workspace>')
		_p('</CodeBlocks_workspace_file>')
	end