Added platform support to CodeLite

This commit is contained in:
starkos 2009-04-24 13:40:28 +00:00
parent 7e973368be
commit 457744c27e
3 changed files with 110 additions and 87 deletions

View File

@ -44,7 +44,7 @@ end
files files
{ {
"src/**.h", "src/**.c", "src/**.lua", "src/**.tmpl", "src/**.h", "src/**.c", "src/**.lua",
"tests/**.lua" "tests/**.lua"
} }

View File

@ -18,8 +18,15 @@
} }
_p(' <Settings Type="%s">', types[prj.kind]) _p(' <Settings Type="%s">', types[prj.kind])
-- build a list of supported target platforms that also includes a generic build
local platforms = premake.filterplatforms(prj.solution, premake.gcc.platforms, "Native")
for _, platform in ipairs(platforms) do
for cfg in premake.eachconfig(prj) do for cfg in premake.eachconfig(prj) do
local name = premake.esc(cfg.name) local name = premake.esc(cfg.name)
if platform ~= "Native" then
name = name .. "|" .. platform
end
local compiler = iif(cfg.language == "C", "gcc", "g++") local compiler = iif(cfg.language == "C", "gcc", "g++")
_p(' <Configuration Name="%s" CompilerType="gnu %s" DebuggerType="GNU gdb debugger" Type="%s">', name, compiler, types[cfg.kind]) _p(' <Configuration Name="%s" CompilerType="gnu %s" DebuggerType="GNU gdb debugger" Type="%s">', name, compiler, types[cfg.kind])
@ -99,15 +106,22 @@
_p(' </AdditionalRules>') _p(' </AdditionalRules>')
_p(' </Configuration>') _p(' </Configuration>')
end end
end
_p(' </Settings>') _p(' </Settings>')
for _, platform in ipairs(platforms) do
for _,cfgname in ipairs(prj.configurations) do for _,cfgname in ipairs(prj.configurations) do
_p(' <Dependencies name="%s">', cfgname) local name = premake.esc(cfgname)
if platform ~= "Native" then
name = name .. "|" .. platform
end
_p(' <Dependencies name="%s">', name)
for _,dep in ipairs(premake.getdependencies(prj)) do for _,dep in ipairs(premake.getdependencies(prj)) do
_p(' <Project Name="%s"/>', dep.name) _p(' <Project Name="%s"/>', dep.name)
end end
_p(' </Dependencies>') _p(' </Dependencies>')
end end
end
_p('</CodeLite_Project>') _p('</CodeLite_Project>')
end end

View File

@ -15,16 +15,25 @@
_p(' <Project Name="%s" Path="%s.project" Active="%s" />', name, fname, active) _p(' <Project Name="%s" Path="%s.project" Active="%s" />', name, fname, active)
end end
-- build a list of supported target platforms that also includes a generic build
local platforms = premake.filterplatforms(sln, premake[_OPTIONS.cc].platforms, "Native")
_p(' <BuildMatrix>') _p(' <BuildMatrix>')
for _, platform in ipairs(platforms) do
for _, cfgname in ipairs(sln.configurations) do for _, cfgname in ipairs(sln.configurations) do
_p(' <WorkspaceConfiguration Name="%s" Selected="yes">', cfgname) local name = cfgname
if platform ~= "Native" then
name = name .. "|" .. platform
end
_p(' <WorkspaceConfiguration Name="%s" Selected="yes">', name)
for _,prj in ipairs(sln.projects) do for _,prj in ipairs(sln.projects) do
_p(' <Project Name="%s" ConfigName="%s"/>', prj.name, cfgname) _p(' <Project Name="%s" ConfigName="%s"/>', prj.name, name)
end end
_p(' </WorkspaceConfiguration>') _p(' </WorkspaceConfiguration>')
end end
end
_p(' </BuildMatrix>') _p(' </BuildMatrix>')
_p('</CodeLite_Workspace>') _p('</CodeLite_Workspace>')
end end