diff --git a/deps/build.jl b/deps/build.jl index c6b481a3..f7b14017 100644 --- a/deps/build.jl +++ b/deps/build.jl @@ -1,3 +1,5 @@ +import Compat: is_unix, is_windows, is_apple + depsfile = joinpath(dirname(@__FILE__),"deps.jl") if isfile(depsfile) rm(depsfile) @@ -15,11 +17,17 @@ paths_to_try = copy(aliases) for a in aliases if haskey(ENV, "GUROBI_HOME") - @unix_only push!(paths_to_try, joinpath(ENV["GUROBI_HOME"],"lib",string("lib",a,".so"))) - @windows_only push!(paths_to_try, joinpath(ENV["GUROBI_HOME"],"bin",string(a,".",Libdl.dlext))) + if is_unix() + push!(paths_to_try, joinpath(ENV["GUROBI_HOME"],"lib",string("lib",a,".so"))) + end + if is_windows() + push!(paths_to_try, joinpath(ENV["GUROBI_HOME"],"bin",string(a,".",Libdl.dlext))) + end end # gurobi uses .so on OS X for some reason - @osx_only push!(paths_to_try, string("lib$a.so")) + if is_apple() + push!(paths_to_try, string("lib$a.so")) + end end found = false