Updated code lite to properly add LD_LIBRARY_PATH is set if libdirs is set
end,
-- source files are handled at the leaves
onleaf = function(node, depth)
-
local excludesFromBuild = {}
for cfg in project.eachconfig(prj) do
local cfgname = codelite.cfgname(cfg)
_p(depth, '<File Name="%s"/>', node.relpath)
end
end,
- }, false, 1)
+ }, true)
end
function m.dependencies(prj)
local pauseexec = iif(prj.kind == "ConsoleApp", "yes", "no")
local isguiprogram = iif(prj.kind == "WindowedApp", "yes", "no")
local isenabled = iif(cfg.flags.ExcludeFromBuild, "no", "yes")
+ local ldPath = ''
+
+ for _, libdir in ipairs(cfg.libdirs) do
+ 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
function m.environment(cfg)
