Skip to content

Commit

Permalink
tidy pathsep logic
Browse files Browse the repository at this point in the history
  • Loading branch information
mlubin committed Jun 16, 2018
1 parent ef74da1 commit 50e410c
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/Ipopt.jl
Expand Up @@ -26,15 +26,14 @@ function __init__()
# doesn't leave environment variables changed.
julia_libdir = joinpath(dirname(first(filter(x -> contains(x, "libjulia"), Libdl.dllist()))), "julia")
julia_bindir = Compat.Sys.BINDIR
pathsep = Compat.Sys.iswindows() ? ';' : ':'
@static if Compat.Sys.isapple()
ENV["DYLD_LIBRARY_PATH"] = string(get(ENV, "DYLD_LIBRARY_PATH", ""),
pathsep, julia_libdir)
":", julia_libdir)
elseif Compat.Sys.islinux()
ENV["LD_LIBRARY_PATH"] = string(get(ENV, "LD_LIBRARY_PATH", ""),
pathsep, julia_libdir)
ENV["LD_LIBRARY_PATH"] = string(get(ENV, "LD_LIBRARY_PATH", ""), ":",
julia_libdir)
elseif Compat.Sys.iswindows()
ENV["PATH"] = string(ENV["PATH"], pathsep, julia_bindir)
ENV["PATH"] = string(ENV["PATH"], ";", julia_bindir)
end
end

Expand Down

0 comments on commit 50e410c

Please sign in to comment.