Skip to content

Commit

Permalink
build.jl: check environment variable first
Browse files Browse the repository at this point in the history
 - otherwise, if system-wide installation exists, can not point it to another
   installation which is useful for testing (debug mode build)
  • Loading branch information
rschwarz committed Dec 17, 2018
1 parent dd9bea0 commit c1c5f8d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion deps/build.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,18 @@ function write_depsfile(path)
end

libname = "libscip.so"
paths_to_try = [libname]
paths_to_try = []

# prefer environment variable
if haskey(ENV, "SCIPOPTDIR")
if Compat.Sys.isunix()
push!(paths_to_try, joinpath(ENV["SCIPOPTDIR"], "lib", libname))
end
end

# but also try library path
push!(paths_to_try, libname)

found = false
for l in paths_to_try
d = Libdl.dlopen_e(l)
Expand Down

0 comments on commit c1c5f8d

Please sign in to comment.