Skip to content

Commit 230adc1

Browse files
trianglemeshdistance: add package (#8806)
* trianglemeshdistance: add package * Update xmake.lua * fix gcc14 * Update xmake.lua
1 parent 7f1a15f commit 230adc1

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
package("trianglemeshdistance")
2+
set_kind("library", {headeronly = true})
3+
set_homepage("https://github.com/InteractiveComputerGraphics/TriangleMeshDistance")
4+
set_description("Header only, single file, simple and efficient C++11 library to compute the signed distance function (SDF) to a triangle mesh")
5+
set_license("Apache-2.0")
6+
7+
add_urls("https://github.com/InteractiveComputerGraphics/TriangleMeshDistance.git")
8+
9+
add_versions("2025.12.06", "566c9486533082fe7d9a3ffae15799bc5c125528")
10+
11+
add_deps("cmake")
12+
13+
on_install(function (package)
14+
io.replace("CMakeLists.txt", "add_subdirectory(tests)", "", {plain = true})
15+
io.replace("TriangleMeshDistance/include/tmd/TriangleMeshDistance.h", "#include <cmath>", "#include <cmath>\n#include <cstdint>", {plain = true})
16+
import("package.tools.cmake").install(package)
17+
end)
18+
19+
on_test(function (package)
20+
assert(package:check_cxxsnippets({test = [[
21+
void test() {
22+
std::vector<std::array<double, 3>> vertices;
23+
std::vector<std::array<int, 3>> triangles;
24+
tmd::TriangleMeshDistance mesh_distance(vertices, triangles);
25+
}
26+
]]}, {configs = {languages = "c++17"}, includes = "tmd/TriangleMeshDistance.h"}))
27+
end)

0 commit comments

Comments
 (0)