Skip to content

Commit

Permalink
Merge pull request #1430 from Enhex/fix_codelite_command
Browse files Browse the repository at this point in the history
fixed adding LD_LIBRARY_PATH to the executable run command.
  • Loading branch information
samsinsane authored Apr 26, 2020
2 parents 78e2509 + fdbdee3 commit 5d0b64c
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions modules/codelite/codelite_project.lua
Original file line number Diff line number Diff line change
Expand Up @@ -268,20 +268,9 @@
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
_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)
end

function m.environment(cfg)
Expand Down

0 comments on commit 5d0b64c

Please sign in to comment.