diff options
| author | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
|---|---|---|
| committer | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
| commit | 54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch) | |
| tree | d915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/manifold | |
Diffstat (limited to 'vcpkg/ports/manifold')
| -rw-r--r-- | vcpkg/ports/manifold/fix-size_t.patch | 13 | ||||
| -rw-r--r-- | vcpkg/ports/manifold/portfile.cmake | 30 | ||||
| -rw-r--r-- | vcpkg/ports/manifold/usage | 4 | ||||
| -rw-r--r-- | vcpkg/ports/manifold/vcpkg.json | 20 |
4 files changed, 67 insertions, 0 deletions
diff --git a/vcpkg/ports/manifold/fix-size_t.patch b/vcpkg/ports/manifold/fix-size_t.patch new file mode 100644 index 0000000..e521106 --- /dev/null +++ b/vcpkg/ports/manifold/fix-size_t.patch @@ -0,0 +1,13 @@ +diff --git a/src/disjoint_sets.h b/src/disjoint_sets.h +index d9da598..ae5f9b4 100644 +--- a/src/disjoint_sets.h ++++ b/src/disjoint_sets.h +@@ -96,7 +96,7 @@ class DisjointSets { + components.resize(mData.size()); + int lonelyNodes = 0; + std::unordered_map<uint32_t, int> toLabel; +- for (size_t i = 0; i < mData.size(); ++i) { ++ for (std::size_t i = 0; i < mData.size(); ++i) { + // we optimize for connected component of size 1 + // no need to put them into the hashmap + auto iParent = find(i); diff --git a/vcpkg/ports/manifold/portfile.cmake b/vcpkg/ports/manifold/portfile.cmake new file mode 100644 index 0000000..2a6cd09 --- /dev/null +++ b/vcpkg/ports/manifold/portfile.cmake @@ -0,0 +1,30 @@ +vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO elalish/manifold
+ REF v${VERSION}
+ SHA512 22ff2236b97fd15463c231b3ce61baeefc6f651b145804480f80146ba83dc4b15d57e5f73ff788604153ec61eace416a409d2a9e7c1327c05cba89a95e2fc536
+ PATCHES
+ fix-size_t.patch
+)
+
+vcpkg_cmake_configure(
+ SOURCE_PATH "${SOURCE_PATH}"
+ OPTIONS
+ -DMANIFOLD_TEST=OFF
+ -DMANIFOLD_CROSS_SECTION=ON
+ -DMANIFOLD_CBIND=ON
+ -DMANIFOLD_PYBIND=OFF
+ -DMANIFOLD_JSBIND=OFF
+ -DMANIFOLD_STRICT=OFF
+)
+
+vcpkg_cmake_install()
+vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/manifold)
+vcpkg_fixup_pkgconfig()
+
+file(REMOVE_RECURSE
+ "${CURRENT_PACKAGES_DIR}/debug/include"
+)
+
+file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
+vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
diff --git a/vcpkg/ports/manifold/usage b/vcpkg/ports/manifold/usage new file mode 100644 index 0000000..4019108 --- /dev/null +++ b/vcpkg/ports/manifold/usage @@ -0,0 +1,4 @@ +manifold provides CMake targets:
+
+ find_package(manifold CONFIG REQUIRED)
+ target_link_libraries(main PRIVATE manifold::manifold)
diff --git a/vcpkg/ports/manifold/vcpkg.json b/vcpkg/ports/manifold/vcpkg.json new file mode 100644 index 0000000..6c80e68 --- /dev/null +++ b/vcpkg/ports/manifold/vcpkg.json @@ -0,0 +1,20 @@ +{ + "name": "manifold", + "version": "3.2.1", + "port-version": 1, + "description": "Geometry library for topological robustness.", + "homepage": "https://github.com/elalish/manifold", + "license": "Apache-2.0", + "dependencies": [ + "clipper2", + "tbb", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} |