Skip to content

Commit

Permalink
update for julia v0.6
Browse files Browse the repository at this point in the history
  • Loading branch information
wildart committed Jul 29, 2017
1 parent 16dd49c commit 27c1450
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ os:
- linux
- osx
julia:
- 0.5
- 0.6
- nightly
notifications:
email: false
Expand Down
3 changes: 1 addition & 2 deletions REQUIRE
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
julia 0.5
julia 0.6
BinDeps
Distances
Compat 0.17
20 changes: 10 additions & 10 deletions deps/build.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,21 @@ using BinDeps
@BinDeps.setup

const flann_version = "1.9.1"
check_built_from_source(name, handle) = startswith(name, Pkg.dir("FLANN"))
libflann = library_dependency("libflann",
aliases = ["libflann1.9", "flann.dll", "flann"],
validate = check_built_from_source)
libflann = library_dependency("libflann", aliases = ["libflann1.9", "flann.dll", "flann"])

provides(Sources,
URI("https://github.com/mariusmuja/flann/archive/$(flann_version).tar.gz"),
libflann,
unpacked_dir="flann-$(flann_version)",
os = :Unix)
provides(Binaries,
URI("https://github.com/wildart/FLANN.jl/releases/download/v0.0.5/libflann-windows-amd64-$(flann_version)-julia-0.5.1.tar.gz"),
URI("https://github.com/wildart/FLANN.jl/releases/download/v0.1.0/libflann-$(flann_version)-julia-$VERSION-x86_64.tar.gz"),
libflann,
unpacked_dir=BinDeps.libdir(libflann) ,
unpacked_dir=".",
os = :Windows)

flannusrdir = BinDeps.usrdir(libflann)
flannlib = joinpath(flannusrdir,"lib","libflann."*Libdl.dlext)
flannsrcdir = joinpath(BinDeps.srcdir(libflann),"flann-$(flann_version)")
flannbuilddir = joinpath(BinDeps.builddir(libflann),flann_version)
provides(BuildProcess,
Expand All @@ -28,12 +26,14 @@ provides(BuildProcess,
CreateDirectory(flannbuilddir)
@build_steps begin
ChangeDirectory(flannbuilddir)
FileRule(joinpath(flannusrdir,"lib","libflann."*BinDeps.shlib_ext), @build_steps begin
`cmake -DCMAKE_BUILD_TYPE="Release" \\
FileRule(flannlib, @build_steps begin
`cmake -Wno-dev -DCMAKE_BUILD_TYPE="Release" \\
-DCMAKE_INSTALL_PREFIX="$flannusrdir" \\
-DBUILD_PYTHON_BINDINGS=OFF \\
-DBUILD_MATLAB_BINDINGS=OFF $flannsrcdir
-Wno-dev`
-DBUILD_EXAMPLES=OFF \\
-DBUILD_TESTS=OFF \\
-DBUILD_DOC=OFF \\
-DBUILD_MATLAB_BINDINGS=OFF $flannsrcdir`
`make`
`make install`
end)
Expand Down
3 changes: 2 additions & 1 deletion src/FLANN.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
__precompile__()

module FLANN

using Compat
using Distances
using BinDeps

Expand Down
2 changes: 1 addition & 1 deletion src/wrapper.jl
Original file line number Diff line number Diff line change
Expand Up @@ -234,4 +234,4 @@ for (T, Tname) in ((Cfloat, "float"), (Cdouble, "double"), (Cint, "int"), (Cucha
ccall(($("flann_free_index_" * Tname), libflann), Cint,
(Ptr{Void}, Ptr{Void}), index.index, flann_params)
end
end
end

0 comments on commit 27c1450

Please sign in to comment.