Skip to content

Commit

Permalink
Merge pull request #6 from oyamad/homebrew_includedir
Browse files Browse the repository at this point in the history
Modify build.jl for OS X with no Homebrew installed
  • Loading branch information
blegat committed Nov 21, 2016
2 parents daa79f8 + 6abb054 commit a62d3d8
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion deps/build.jl
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,22 @@ libsrcgmp_dir = joinpath(src_dir, "lib-src-gmp")

includedirs = AbstractString[libsrc_dir, libsrcgmp_dir]
targetdirs = AbstractString["lib-src-gmp/libcddgmp.la","lib-src-gmp/.libs/libcddgmp.la"]
configureopts = AbstractString["CPPFLAGS=-DGMPRATIONAL -I$(libsrc_dir) -I$(libsrcgmp_dir)"]
@static if is_apple()
homebrew_includedir = joinpath(Homebrew.brew_prefix, "include")
configureopts = AbstractString["CPPFLAGS=-DGMPRATIONAL -I$(libsrc_dir) -I$(libsrcgmp_dir) -I$(homebrew_includedir)"]
homebrew_libdir = joinpath(Homebrew.brew_prefix, "lib")
libdirs = AbstractString[homebrew_libdir]
else
configureopts = AbstractString["CPPFLAGS=-DGMPRATIONAL -I$(libsrc_dir) -I$(libsrcgmp_dir)"]
libdirs = AbstractString[] # What to include?
end

provides(BuildProcess,
Dict(
Autotools(
libtarget = targetdirs,
include_dirs = includedirs,
lib_dirs = libdirs,
configure_options = configureopts) => libcdd))

@BinDeps.install Dict(:libcddgmp => :libcdd)

0 comments on commit a62d3d8

Please sign in to comment.