package An official xmake package repository https://xrepo.xmake.io/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
1.6 KiB

package("nanoflann")
set_kind("library", {headeronly = true})
set_homepage("https://github.com/jlblancoc/nanoflann/")
set_description("nanoflann: a C++11 header-only library for Nearest Neighbor (NN) search with KD-trees")
set_license("BSD-2-Clause")
add_urls("https://github.com/jlblancoc/nanoflann/archive/refs/tags/$(version).tar.gz",
"https://github.com/jlblancoc/nanoflann.git")
add_versions("v1.6.1", "e258d6fd6ad18e1809fa9c081553e78036fd6e7b418d3762875c2c5a015dd431")
add_versions("v1.6.0", "f889026fbcb241e1e9d71bab5dfb9cc35775bf18a6466a283e2cbcd60edb2705")
add_versions("v1.5.5", "fd28045eabaf0e7f12236092f80905a1750e0e6b580bb40eadd64dc4f75d641d")
add_versions("v1.3.2", "e100b5fc8d72e9426a80312d852a62c05ddefd23f17cbb22ccd8b458b11d0bea")
add_versions("v1.4.2", "97fce650eb644a359a767af526cab9ba31842e53790a7279887e1ae2fffe7319")
add_versions("v1.5.0", "89aecfef1a956ccba7e40f24561846d064f309bc547cc184af7f4426e42f8e65")
add_deps("cmake")
on_install(function (package)
import("package.tools.cmake").install(package, {"-DNANOFLANN_BUILD_EXAMPLES=OFF", "-DNANOFLANN_BUILD_TESTS=OFF"})
end)
on_test(function (package)
assert(package:check_cxxsnippets({test = [[
void test() {
const size_t num_results = 1;
size_t ret_index;
float out_dist_sqr;
nanoflann::KNNResultSet<float> resultSet(num_results);
resultSet.init(&ret_index, &out_dist_sqr);
}
]]}, {configs = {languages = "c++11"}, includes = "nanoflann.hpp"}))
end)