Updated code lite to properly add LD_LIBRARY_PATH is set if libdirs is set
This commit is contained in:
parent
6e380c0242
commit
80a85aed7d
@ -124,7 +124,6 @@
|
|||||||
end,
|
end,
|
||||||
-- source files are handled at the leaves
|
-- source files are handled at the leaves
|
||||||
onleaf = function(node, depth)
|
onleaf = function(node, depth)
|
||||||
|
|
||||||
local excludesFromBuild = {}
|
local excludesFromBuild = {}
|
||||||
for cfg in project.eachconfig(prj) do
|
for cfg in project.eachconfig(prj) do
|
||||||
local cfgname = codelite.cfgname(cfg)
|
local cfgname = codelite.cfgname(cfg)
|
||||||
@ -140,7 +139,7 @@
|
|||||||
_p(depth, '<File Name="%s"/>', node.relpath)
|
_p(depth, '<File Name="%s"/>', node.relpath)
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
}, false, 1)
|
}, true)
|
||||||
end
|
end
|
||||||
|
|
||||||
function m.dependencies(prj)
|
function m.dependencies(prj)
|
||||||
@ -268,9 +267,20 @@
|
|||||||
local pauseexec = iif(prj.kind == "ConsoleApp", "yes", "no")
|
local pauseexec = iif(prj.kind == "ConsoleApp", "yes", "no")
|
||||||
local isguiprogram = iif(prj.kind == "WindowedApp", "yes", "no")
|
local isguiprogram = iif(prj.kind == "WindowedApp", "yes", "no")
|
||||||
local isenabled = iif(cfg.flags.ExcludeFromBuild, "no", "yes")
|
local isenabled = iif(cfg.flags.ExcludeFromBuild, "no", "yes")
|
||||||
|
local ldPath = ''
|
||||||
|
|
||||||
_x(3, '<General OutputFile="%s" IntermediateDirectory="%s" Command="%s" CommandArguments="%s" UseSeparateDebugArgs="%s" DebugArguments="%s" WorkingDirectory="%s" PauseExecWhenProcTerminates="%s" IsGUIProgram="%s" IsEnabled="%s"/>',
|
for _, libdir in ipairs(cfg.libdirs) do
|
||||||
targetname, objdir, command, cmdargs, useseparatedebugargs, debugargs, workingdir, pauseexec, isguiprogram, isenabled)
|
ldPath = ldPath .. ":" .. project.getrelative(cfg.project, libdir)
|
||||||
|
end
|
||||||
|
|
||||||
|
if ldPath == nil or ldPath == '' then
|
||||||
|
_x(3, '<General OutputFile="%s" IntermediateDirectory="%s" Command="%s" CommandArguments="%s" UseSeparateDebugArgs="%s" DebugArguments="%s" WorkingDirectory="%s" PauseExecWhenProcTerminates="%s" IsGUIProgram="%s" IsEnabled="%s"/>',
|
||||||
|
targetname, objdir, command, cmdargs, useseparatedebugargs, debugargs, workingdir, pauseexec, isguiprogram, isenabled)
|
||||||
|
else
|
||||||
|
ldPath = string.sub(ldPath, 2)
|
||||||
|
_x(3, '<General OutputFile="%s" IntermediateDirectory="%s" Command="LD_LIBRARY_PATH=%s %s" CommandArguments="%s" UseSeparateDebugArgs="%s" DebugArguments="%s" WorkingDirectory="%s" PauseExecWhenProcTerminates="%s" IsGUIProgram="%s" IsEnabled="%s"/>',
|
||||||
|
targetname, objdir, ldPath, command, cmdargs, useseparatedebugargs, debugargs, workingdir, pauseexec, isguiprogram, isenabled)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function m.environment(cfg)
|
function m.environment(cfg)
|
||||||
|
Reference in New Issue
Block a user