From 4b978b5b952449efe99757f4bd0f66282d259e17 Mon Sep 17 00:00:00 2001 From: toge Date: Fri, 27 Feb 2026 15:55:56 +0900 Subject: [PATCH 01/33] [meshlib] add new port --- ports/meshlib/fix-cassert.patch | 13 ++++ ports/meshlib/fix-e57format.patch | 14 ++++ ports/meshlib/fix-exported-include-dirs.patch | 64 +++++++++++++++++++ .../fix-linux-openvdb-blosc-link.patch | 17 +++++ ports/meshlib/fix-msvc-lazperf-build.patch | 37 +++++++++++ ports/meshlib/portfile.cmake | 47 ++++++++++++++ ports/meshlib/vcpkg.json | 37 +++++++++++ versions/baseline.json | 4 ++ versions/m-/meshlib.json | 9 +++ 9 files changed, 242 insertions(+) create mode 100644 ports/meshlib/fix-cassert.patch create mode 100644 ports/meshlib/fix-e57format.patch create mode 100644 ports/meshlib/fix-exported-include-dirs.patch create mode 100644 ports/meshlib/fix-linux-openvdb-blosc-link.patch create mode 100644 ports/meshlib/fix-msvc-lazperf-build.patch create mode 100644 ports/meshlib/portfile.cmake create mode 100644 ports/meshlib/vcpkg.json create mode 100644 versions/m-/meshlib.json diff --git a/ports/meshlib/fix-cassert.patch b/ports/meshlib/fix-cassert.patch new file mode 100644 index 00000000000000..2d4f0f4f54767f --- /dev/null +++ b/ports/meshlib/fix-cassert.patch @@ -0,0 +1,13 @@ +diff --git a/source/MRMesh/MRBestFitPolynomial.cpp b/source/MRMesh/MRBestFitPolynomial.cpp +--- a/source/MRMesh/MRBestFitPolynomial.cpp ++++ b/source/MRMesh/MRBestFitPolynomial.cpp +@@ -1,8 +1,9 @@ + #include "MRBestFitPolynomial.h" + #include "MRGTest.h" + + #include + #include + ++#include + #include + #include diff --git a/ports/meshlib/fix-e57format.patch b/ports/meshlib/fix-e57format.patch new file mode 100644 index 00000000000000..411edc07c6bf5b --- /dev/null +++ b/ports/meshlib/fix-e57format.patch @@ -0,0 +1,14 @@ +diff --git a/source/MRIOExtras/CMakeLists.txt b/source/MRIOExtras/CMakeLists.txt +index ff8f459..f772ea5 100644 +--- a/source/MRIOExtras/CMakeLists.txt ++++ b/source/MRIOExtras/CMakeLists.txt +@@ -43,7 +43,8 @@ IF(NOT MRIOEXTRAS_NO_CTM) + ENDIF() + + IF(NOT MRIOEXTRAS_NO_E57) +- target_link_libraries(${PROJECT_NAME} PRIVATE E57Format) ++ find_package(E57Format CONFIG REQUIRED) ++ target_link_libraries(${PROJECT_NAME} PRIVATE E57Format) + + IF(MSVC AND DEFINED VCPKG_INSTALLED_DIR AND DEFINED VCPKG_TARGET_TRIPLET) + file(GLOB XERCES_DLL_RELEASE "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/bin/xerces-c_3_*.dll") diff --git a/ports/meshlib/fix-exported-include-dirs.patch b/ports/meshlib/fix-exported-include-dirs.patch new file mode 100644 index 00000000000000..a9fbbe67cdc76d --- /dev/null +++ b/ports/meshlib/fix-exported-include-dirs.patch @@ -0,0 +1,64 @@ +diff --git a/source/MRMesh/CMakeLists.txt b/source/MRMesh/CMakeLists.txt +--- a/source/MRMesh/CMakeLists.txt ++++ b/source/MRMesh/CMakeLists.txt +@@ -66,6 +66,8 @@ target_link_libraries(${PROJECT_NAME} PRIVATE libzip::zip) + # TODO: CMake config + target_include_directories(${PROJECT_NAME} + PUBLIC ++ $ ++ $ + $ + ) + + IF(APPLE) + # for Boost.Stacktrace + target_compile_definitions(${PROJECT_NAME} PUBLIC _GNU_SOURCE) +diff --git a/source/MRIOExtras/CMakeLists.txt b/source/MRIOExtras/CMakeLists.txt +--- a/source/MRIOExtras/CMakeLists.txt ++++ b/source/MRIOExtras/CMakeLists.txt +@@ -24,6 +24,12 @@ add_library(${PROJECT_NAME} SHARED ${SOURCES} ${HEADERS}) + + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config_cmake.h.in ${CMAKE_CURRENT_SOURCE_DIR}/config_cmake.h) + ++target_include_directories(${PROJECT_NAME} ++ PUBLIC ++ $ ++ $ ++ ) ++ + target_link_libraries(${PROJECT_NAME} + PUBLIC + MRMesh +diff --git a/source/MRVoxels/CMakeLists.txt b/source/MRVoxels/CMakeLists.txt +--- a/source/MRVoxels/CMakeLists.txt ++++ b/source/MRVoxels/CMakeLists.txt +@@ -25,6 +25,12 @@ target_link_libraries(${PROJECT_NAME} + PUBLIC + MRMesh + OpenVDB::openvdb + ) ++ ++target_include_directories(${PROJECT_NAME} ++ PUBLIC ++ $ ++ $ ++) + # required for static linking + IF(EMSCRIPTEN OR UNIX) +diff --git a/source/MRSymbolMesh/CMakeLists.txt b/source/MRSymbolMesh/CMakeLists.txt +--- a/source/MRSymbolMesh/CMakeLists.txt ++++ b/source/MRSymbolMesh/CMakeLists.txt +@@ -15,6 +15,12 @@ target_link_libraries(${PROJECT_NAME} + MRMesh + PRIVATE + Freetype::Freetype + ) ++ ++target_include_directories(${PROJECT_NAME} ++ PUBLIC ++ $ ++ $ ++ ) + + install( + TARGETS ${PROJECT_NAME} diff --git a/ports/meshlib/fix-linux-openvdb-blosc-link.patch b/ports/meshlib/fix-linux-openvdb-blosc-link.patch new file mode 100644 index 00000000000000..d06f267f987da0 --- /dev/null +++ b/ports/meshlib/fix-linux-openvdb-blosc-link.patch @@ -0,0 +1,17 @@ +diff --git a/source/MRVoxels/CMakeLists.txt b/source/MRVoxels/CMakeLists.txt +index 8b4df1f..d302e41 100644 +--- a/source/MRVoxels/CMakeLists.txt ++++ b/source/MRVoxels/CMakeLists.txt +@@ -32,9 +32,10 @@ target_link_libraries(${PROJECT_NAME} + OpenVDB::openvdb + ) + # required for static linking +-IF(EMSCRIPTEN) +- target_link_libraries(${PROJECT_NAME} PRIVATE blosc) ++IF(EMSCRIPTEN OR UNIX) ++ find_package(blosc CONFIG REQUIRED) ++ target_link_libraries(${PROJECT_NAME} PRIVATE blosc_static) + ENDIF() + + IF(NOT MRVOXELS_NO_DICOM) + find_package(GDCM CONFIG REQUIRED) diff --git a/ports/meshlib/fix-msvc-lazperf-build.patch b/ports/meshlib/fix-msvc-lazperf-build.patch new file mode 100644 index 00000000000000..dbd8296d5f378c --- /dev/null +++ b/ports/meshlib/fix-msvc-lazperf-build.patch @@ -0,0 +1,37 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ea44ef0..8600c40 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -208,6 +208,10 @@ ENDIF() + # MRMesh library is always built + add_subdirectory(${PROJECT_SOURCE_DIR}/MRPch ./MRPch) + add_subdirectory(${PROJECT_SOURCE_DIR}/MRMesh ./MRMesh) ++ ++IF(MESHLIB_BUILD_EXTRA_IO_FORMATS) ++ add_subdirectory(${PROJECT_SOURCE_DIR}/laz-perf) ++ENDIF() + + IF(MESHLIB_BUILD_EXTRA_IO_FORMATS) + add_subdirectory(${PROJECT_SOURCE_DIR}/MRIOExtras ./MRIOExtras) +@@ -274,6 +278,5 @@ IF(MESHLIB_PYTHON_SUPPORT) + ENDIF() + + IF(MSVC) +- add_subdirectory(${PROJECT_SOURCE_DIR}/laz-perf) + add_subdirectory(${PROJECT_SOURCE_DIR}/OpenCTM) + ENDIF() +diff --git a/source/laz-perf/CMakeLists.txt b/source/laz-perf/CMakeLists.txt +index 3cb0485..7a4a398 100644 +--- a/source/laz-perf/CMakeLists.txt ++++ b/source/laz-perf/CMakeLists.txt +@@ -1,7 +1,9 @@ + # This file exists so we can disable some warnings in Lazperf. + # If we were to `add_subdirectory` it directly from `MeshLib/CMakeLists.txt`, we would have to modify the global CXX flags, which is uncool. + +-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4244 /wd4245 /wd4456 /wd4458 /wd5051") ++if(MSVC) ++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4244 /wd4245 /wd4456 /wd4458 /wd5051") ++endif() + set(WITH_TESTS OFF CACHE BOOL "Choose if LAZPERF unit tests should be built") + set(WITH_TOOLS OFF CACHE BOOL "Choose if LAZPERF tools should be built") + add_subdirectory(${MESHLIB_THIRDPARTY_DIR}/laz-perf ./laz-perf) diff --git a/ports/meshlib/portfile.cmake b/ports/meshlib/portfile.cmake new file mode 100644 index 00000000000000..d24c0a76aa92c0 --- /dev/null +++ b/ports/meshlib/portfile.cmake @@ -0,0 +1,47 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO MeshInspector/MeshLib + REF v${VERSION} + SHA512 ec4eb605c3fb1dcddc6d2219baa6eb9402bf57b1840d601bcc92b82b9b48a4d8bd8221b2589cc0677eef9185977a0afdde1464d74dccd964c4ff2dc5a1742be9 + PATCHES + fix-msvc-lazperf-build.patch + fix-linux-openvdb-blosc-link.patch + fix-cassert.patch + fix-e57format.patch + fix-exported-include-dirs.patch + HEAD_REF master +) + +vcpkg_from_github( + OUT_SOURCE_PATH LAZ_PERF_SOURCE_PATH + REPO MeshInspector/laz-perf + REF 8d0a813a3b125fbc21ef214cf79609a1636cc9e4 + SHA512 56df3dce943c4e6865dcfb18b32f184d260867069f6f4bffe8f2478c813c13d618fcea3b121e9632aa008e09fbc6899858caaadcd45fb8f8e2e5793f34f1e2b2 + HEAD_REF master +) +file(REMOVE_RECURSE "${SOURCE_PATH}/thirdparty/laz-perf") +file(COPY "${LAZ_PERF_SOURCE_PATH}/" DESTINATION "${SOURCE_PATH}/thirdparty/laz-perf") + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + DISABLE_PARALLEL_CONFIGURE + OPTIONS + -DBUILD_TESTING=OFF + -DMESHLIB_PYTHON_SUPPORT=OFF + -DMESHLIB_BUILD_MRCUDA=OFF + -DMESHLIB_BUILD_MESHVIEWER=OFF + -DMESHLIB_BUILD_MRVIEWER=OFF + -DMESHLIB_BUILD_PYTHON_MODULES=OFF + -DMESHLIB_USE_VCPKG=ON + -DMRIOEXTRAS_NO_CTM=ON # API compatibility issue with openctm + +) +vcpkg_cmake_install() + +vcpkg_fixup_pkgconfig() +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/MeshLib) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share" + "${CURRENT_PACKAGES_DIR}/debug/include" +) +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") diff --git a/ports/meshlib/vcpkg.json b/ports/meshlib/vcpkg.json new file mode 100644 index 00000000000000..8edcf2c951fadb --- /dev/null +++ b/ports/meshlib/vcpkg.json @@ -0,0 +1,37 @@ +{ + "name": "meshlib", + "version": "3.1.1.92", + "description": "Mesh processing library", + "homepage": "https://meshlib.io/", + "license": null, + "dependencies": [ + "blosc", + "boost", + "eigen3", + "fmt", + "freetype", + "gdcm", + "jsoncpp", + "libe57format", + "libharu", + "libzip", + "mbedtls", + "opencascade", + "openvdb", + "parallel-hashmap", + "spdlog", + "tbb", + "tiff", + "tinygltf", + "tinyxml2", + "tl-expected", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/versions/baseline.json b/versions/baseline.json index fefadf740aeb19..cc6ad0f04d8c04 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -6344,6 +6344,10 @@ "baseline": "1.2b", "port-version": 6 }, + "meshlib": { + "baseline": "3.1.1.92", + "port-version": 0 + }, "meshoptimizer": { "baseline": "1.0.1", "port-version": 0 diff --git a/versions/m-/meshlib.json b/versions/m-/meshlib.json new file mode 100644 index 00000000000000..42f3f38def50c6 --- /dev/null +++ b/versions/m-/meshlib.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "572564a410bee3eb12250968ffd9cedffb9de9ec", + "version": "3.1.1.92", + "port-version": 0 + } + ] +} From ffe6b5148c6216543935d239887f9b71e308a37e Mon Sep 17 00:00:00 2001 From: toge Date: Fri, 27 Feb 2026 17:50:31 +0900 Subject: [PATCH 02/33] fix libjpeg-turbo link error --- ports/meshlib/fix-jpeg-link.patch | 19 +++++++++++++++++++ ports/meshlib/portfile.cmake | 3 ++- ports/meshlib/vcpkg.json | 1 + versions/m-/meshlib.json | 2 +- 4 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 ports/meshlib/fix-jpeg-link.patch diff --git a/ports/meshlib/fix-jpeg-link.patch b/ports/meshlib/fix-jpeg-link.patch new file mode 100644 index 00000000000000..22ea36e70e9df0 --- /dev/null +++ b/ports/meshlib/fix-jpeg-link.patch @@ -0,0 +1,19 @@ +diff --git a/source/MRIOExtras/CMakeLists.txt b/source/MRIOExtras/CMakeLists.txt +index 5079163..81f7742 100644 +--- a/source/MRIOExtras/CMakeLists.txt ++++ b/source/MRIOExtras/CMakeLists.txt +@@ -79,12 +79,8 @@ IF(NOT MRIOEXTRAS_NO_E57) + ENDIF() + + IF(NOT MRIOEXTRAS_NO_JPEG) +- IF(APPLE) +- target_include_directories(${PROJECT_NAME} PRIVATE $) # @todo +- target_link_libraries(${PROJECT_NAME} PRIVATE ${HOMEBREW_PREFIX}/opt/jpeg-turbo/lib/libturbojpeg.dylib) +- ELSE() +- target_link_libraries(${PROJECT_NAME} PRIVATE turbojpeg) +- ENDIF() ++ find_package(libjpeg-turbo CONFIG REQUIRED) ++ target_link_libraries(${PROJECT_NAME} PRIVATE $,libjpeg-turbo::turbojpeg,libjpeg-turbo::turbojpeg-static>) + ENDIF() + + IF(NOT MRIOEXTRAS_NO_LAS) diff --git a/ports/meshlib/portfile.cmake b/ports/meshlib/portfile.cmake index d24c0a76aa92c0..2aec68cc6cd116 100644 --- a/ports/meshlib/portfile.cmake +++ b/ports/meshlib/portfile.cmake @@ -3,13 +3,14 @@ vcpkg_from_github( REPO MeshInspector/MeshLib REF v${VERSION} SHA512 ec4eb605c3fb1dcddc6d2219baa6eb9402bf57b1840d601bcc92b82b9b48a4d8bd8221b2589cc0677eef9185977a0afdde1464d74dccd964c4ff2dc5a1742be9 + HEAD_REF master PATCHES fix-msvc-lazperf-build.patch fix-linux-openvdb-blosc-link.patch fix-cassert.patch fix-e57format.patch fix-exported-include-dirs.patch - HEAD_REF master + fix-jpeg-link.patch ) vcpkg_from_github( diff --git a/ports/meshlib/vcpkg.json b/ports/meshlib/vcpkg.json index 8edcf2c951fadb..442ad901b208f8 100644 --- a/ports/meshlib/vcpkg.json +++ b/ports/meshlib/vcpkg.json @@ -14,6 +14,7 @@ "jsoncpp", "libe57format", "libharu", + "libjpeg-turbo", "libzip", "mbedtls", "opencascade", diff --git a/versions/m-/meshlib.json b/versions/m-/meshlib.json index 42f3f38def50c6..5bc8162ee403d6 100644 --- a/versions/m-/meshlib.json +++ b/versions/m-/meshlib.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "572564a410bee3eb12250968ffd9cedffb9de9ec", + "git-tree": "030cf4b5022286a4a872ee7cf6eb041c455326d9", "version": "3.1.1.92", "port-version": 0 } From 42e7a4a6bdad434b6766f23467dc051f68444aff Mon Sep 17 00:00:00 2001 From: toge Date: Fri, 27 Feb 2026 23:12:16 +0900 Subject: [PATCH 03/33] disable test, force using C++20 --- ports/meshlib/disable-test.patch | 12 ++++++++++++ ports/meshlib/portfile.cmake | 3 +++ versions/m-/meshlib.json | 2 +- 3 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 ports/meshlib/disable-test.patch diff --git a/ports/meshlib/disable-test.patch b/ports/meshlib/disable-test.patch new file mode 100644 index 00000000000000..c71f1df3e18a12 --- /dev/null +++ b/ports/meshlib/disable-test.patch @@ -0,0 +1,12 @@ +diff --git a/source/MRPch/MRPch.h b/source/MRPch/MRPch.h +index 794d984..57502c6 100644 +--- a/source/MRPch/MRPch.h ++++ b/source/MRPch/MRPch.h +@@ -43,7 +43,6 @@ + #include + #endif + +-#include + + #ifdef _WIN32 + #pragma warning(push) diff --git a/ports/meshlib/portfile.cmake b/ports/meshlib/portfile.cmake index 2aec68cc6cd116..512d49a98dce22 100644 --- a/ports/meshlib/portfile.cmake +++ b/ports/meshlib/portfile.cmake @@ -11,6 +11,7 @@ vcpkg_from_github( fix-e57format.patch fix-exported-include-dirs.patch fix-jpeg-link.patch + disable-test.patch ) vcpkg_from_github( @@ -28,12 +29,14 @@ vcpkg_cmake_configure( DISABLE_PARALLEL_CONFIGURE OPTIONS -DBUILD_TESTING=OFF + -DMR_CXX_STANDARD=20 -DMESHLIB_PYTHON_SUPPORT=OFF -DMESHLIB_BUILD_MRCUDA=OFF -DMESHLIB_BUILD_MESHVIEWER=OFF -DMESHLIB_BUILD_MRVIEWER=OFF -DMESHLIB_BUILD_PYTHON_MODULES=OFF -DMESHLIB_USE_VCPKG=ON + -DMRMESH_NO_GTEST=ON -DMRIOEXTRAS_NO_CTM=ON # API compatibility issue with openctm ) diff --git a/versions/m-/meshlib.json b/versions/m-/meshlib.json index 5bc8162ee403d6..50aa0ef0861e34 100644 --- a/versions/m-/meshlib.json +++ b/versions/m-/meshlib.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "030cf4b5022286a4a872ee7cf6eb041c455326d9", + "git-tree": "66da419260f1a0e456cc7f97e7224d2b7bfef3f7", "version": "3.1.1.92", "port-version": 0 } From b42d761f29db689ae6ba44cb03d70e23e5c1f197 Mon Sep 17 00:00:00 2001 From: toge Date: Sat, 28 Feb 2026 00:43:47 +0900 Subject: [PATCH 04/33] update laz-perf --- ports/meshlib/portfile.cmake | 4 ++-- versions/m-/meshlib.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/meshlib/portfile.cmake b/ports/meshlib/portfile.cmake index 512d49a98dce22..067d651bde7307 100644 --- a/ports/meshlib/portfile.cmake +++ b/ports/meshlib/portfile.cmake @@ -17,8 +17,8 @@ vcpkg_from_github( vcpkg_from_github( OUT_SOURCE_PATH LAZ_PERF_SOURCE_PATH REPO MeshInspector/laz-perf - REF 8d0a813a3b125fbc21ef214cf79609a1636cc9e4 - SHA512 56df3dce943c4e6865dcfb18b32f184d260867069f6f4bffe8f2478c813c13d618fcea3b121e9632aa008e09fbc6899858caaadcd45fb8f8e2e5793f34f1e2b2 + REF 05ea01542e5c4417c05e7222f920e06276c79324 + SHA512 de933635f31fb726b359e1058e3666006b236acc0fa5fc20049288fd19446d6f482b34f926a398cb1760e6cae9a6cbd52c2a2dd6bbf3717145f49e3d04404c0a HEAD_REF master ) file(REMOVE_RECURSE "${SOURCE_PATH}/thirdparty/laz-perf") diff --git a/versions/m-/meshlib.json b/versions/m-/meshlib.json index 50aa0ef0861e34..f58d5f91b9144e 100644 --- a/versions/m-/meshlib.json +++ b/versions/m-/meshlib.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "66da419260f1a0e456cc7f97e7224d2b7bfef3f7", + "git-tree": "607d80de174cb900ed6b95a6e728b2c7092e3bc8", "version": "3.1.1.92", "port-version": 0 } From 4c242c3e1c44836e276d8cde74e0bad1c820fabd Mon Sep 17 00:00:00 2001 From: toge Date: Sat, 28 Feb 2026 02:04:04 +0900 Subject: [PATCH 05/33] force C++17 on lazperf --- ports/meshlib/lazperf-cpp17.patch | 24 ++++++++++++++++++++++++ ports/meshlib/portfile.cmake | 2 ++ versions/m-/meshlib.json | 2 +- 3 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 ports/meshlib/lazperf-cpp17.patch diff --git a/ports/meshlib/lazperf-cpp17.patch b/ports/meshlib/lazperf-cpp17.patch new file mode 100644 index 00000000000000..8206a8247ccccc --- /dev/null +++ b/ports/meshlib/lazperf-cpp17.patch @@ -0,0 +1,24 @@ +diff --git a/cmake/unix_compiler_options.cmake b/cmake/unix_compiler_options.cmake +index fa85a8d..0b2078b 100644 +--- a/cmake/unix_compiler_options.cmake ++++ b/cmake/unix_compiler_options.cmake +@@ -1,5 +1,5 @@ + function(lazperf_target_compile_settings target) +- set_property(TARGET ${target} PROPERTY CXX_STANDARD 11) ++ set_property(TARGET ${target} PROPERTY CXX_STANDARD 17) + set_property(TARGET ${target} PROPERTY CXX_STANDARD_REQUIRED TRUE) + if (${CMAKE_CXX_COMPILER_ID} MATCHES "GNU") + # +diff --git a/cmake/win32_compiler_options.cmake b/cmake/win32_compiler_options.cmake +index 497213f..854f8f7 100644 +--- a/cmake/win32_compiler_options.cmake ++++ b/cmake/win32_compiler_options.cmake +@@ -3,7 +3,7 @@ + # + + function(lazperf_target_compile_settings target) +- set_property(TARGET ${target} PROPERTY CXX_STANDARD 11) ++ set_property(TARGET ${target} PROPERTY CXX_STANDARD 17) + set_property(TARGET ${target} PROPERTY CXX_STANDARD_REQUIRED TRUE) + target_compile_definitions(${target} PRIVATE + -DWIN32_LEAN_AND_MEAN) diff --git a/ports/meshlib/portfile.cmake b/ports/meshlib/portfile.cmake index 067d651bde7307..165ce7029e6bac 100644 --- a/ports/meshlib/portfile.cmake +++ b/ports/meshlib/portfile.cmake @@ -20,6 +20,8 @@ vcpkg_from_github( REF 05ea01542e5c4417c05e7222f920e06276c79324 SHA512 de933635f31fb726b359e1058e3666006b236acc0fa5fc20049288fd19446d6f482b34f926a398cb1760e6cae9a6cbd52c2a2dd6bbf3717145f49e3d04404c0a HEAD_REF master + PATCHES + lazperf-cpp17.patch ) file(REMOVE_RECURSE "${SOURCE_PATH}/thirdparty/laz-perf") file(COPY "${LAZ_PERF_SOURCE_PATH}/" DESTINATION "${SOURCE_PATH}/thirdparty/laz-perf") diff --git a/versions/m-/meshlib.json b/versions/m-/meshlib.json index f58d5f91b9144e..dcf13da81d1f43 100644 --- a/versions/m-/meshlib.json +++ b/versions/m-/meshlib.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "607d80de174cb900ed6b95a6e728b2c7092e3bc8", + "git-tree": "273b2acd25b63626f962e4785d22d0e6211a997a", "version": "3.1.1.92", "port-version": 0 } From 5a98cdf24b433ac4d3c59e7efea2932684bb62f4 Mon Sep 17 00:00:00 2001 From: toge Date: Sun, 1 Mar 2026 09:51:35 +0900 Subject: [PATCH 06/33] disable openctm --- ports/meshlib/disable-openctm.patch | 12 ++++++++++++ ports/meshlib/portfile.cmake | 1 + versions/m-/meshlib.json | 2 +- 3 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 ports/meshlib/disable-openctm.patch diff --git a/ports/meshlib/disable-openctm.patch b/ports/meshlib/disable-openctm.patch new file mode 100644 index 00000000000000..eade1ba72d9c8c --- /dev/null +++ b/ports/meshlib/disable-openctm.patch @@ -0,0 +1,12 @@ +diff --git a/thirdparty/CMakeLists.txt b/thirdparty/CMakeLists.txt +index e4734cf..4aca508 100644 +--- a/thirdparty/CMakeLists.txt ++++ b/thirdparty/CMakeLists.txt +@@ -83,7 +83,6 @@ IF(NOT APPLE AND NOT MR_EMSCRIPTEN) + ENDIF() + ENDIF() + +-add_subdirectory(./OpenCTM-git ./OpenCTM) + + option(PHMAP_INSTALL "" ON) + add_subdirectory(./parallel-hashmap) diff --git a/ports/meshlib/portfile.cmake b/ports/meshlib/portfile.cmake index 165ce7029e6bac..14840fcf385904 100644 --- a/ports/meshlib/portfile.cmake +++ b/ports/meshlib/portfile.cmake @@ -12,6 +12,7 @@ vcpkg_from_github( fix-exported-include-dirs.patch fix-jpeg-link.patch disable-test.patch + disable-openctm.patch ) vcpkg_from_github( diff --git a/versions/m-/meshlib.json b/versions/m-/meshlib.json index dcf13da81d1f43..6b171c0c3a28b3 100644 --- a/versions/m-/meshlib.json +++ b/versions/m-/meshlib.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "273b2acd25b63626f962e4785d22d0e6211a997a", + "git-tree": "6b623bb773b5283c747ae047c01748ac3b0fdd7b", "version": "3.1.1.92", "port-version": 0 } From 370ab842f7edaa50a95f43167b8e0b8d86f28150 Mon Sep 17 00:00:00 2001 From: toge Date: Sun, 1 Mar 2026 22:55:43 +0900 Subject: [PATCH 07/33] disable openctm subdirectory --- ports/meshlib/disable-openctm.patch | 12 ++++++++++++ versions/m-/meshlib.json | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/ports/meshlib/disable-openctm.patch b/ports/meshlib/disable-openctm.patch index eade1ba72d9c8c..a2cec5d128a54f 100644 --- a/ports/meshlib/disable-openctm.patch +++ b/ports/meshlib/disable-openctm.patch @@ -1,3 +1,15 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ed97ca0..e9751cb 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -278,7 +278,6 @@ IF(MESHLIB_PYTHON_SUPPORT) + ENDIF() + + IF(MSVC) +- add_subdirectory(${PROJECT_SOURCE_DIR}/OpenCTM) + ENDIF() + + IF(NOT MR_EMSCRIPTEN) diff --git a/thirdparty/CMakeLists.txt b/thirdparty/CMakeLists.txt index e4734cf..4aca508 100644 --- a/thirdparty/CMakeLists.txt diff --git a/versions/m-/meshlib.json b/versions/m-/meshlib.json index 6b171c0c3a28b3..9f558bb7c68014 100644 --- a/versions/m-/meshlib.json +++ b/versions/m-/meshlib.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "6b623bb773b5283c747ae047c01748ac3b0fdd7b", + "git-tree": "dbde340653685d813c6d9e9a13519c5232217c49", "version": "3.1.1.92", "port-version": 0 } From ef10e37e7bb1c90fa97d2f3d5344ec45a47a15e2 Mon Sep 17 00:00:00 2001 From: toge Date: Mon, 2 Mar 2026 16:12:50 +0900 Subject: [PATCH 08/33] disable /WX --- ports/meshlib/disable-warning-as-error.patch | 13 +++++++++++++ ports/meshlib/portfile.cmake | 1 + versions/m-/meshlib.json | 2 +- 3 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 ports/meshlib/disable-warning-as-error.patch diff --git a/ports/meshlib/disable-warning-as-error.patch b/ports/meshlib/disable-warning-as-error.patch new file mode 100644 index 00000000000000..35aec46a87d01b --- /dev/null +++ b/ports/meshlib/disable-warning-as-error.patch @@ -0,0 +1,13 @@ +diff --git a/cmake/Modules/CompilerOptions.cmake b/cmake/Modules/CompilerOptions.cmake +index 0817b2b..644b535 100644 +--- a/cmake/Modules/CompilerOptions.cmake ++++ b/cmake/Modules/CompilerOptions.cmake +@@ -39,7 +39,7 @@ IF(MSVC) + set(MESHLIB_COMMON_C_CXX_FLAGS "/utf-8 /fp:precise /permissive- /Zc:wchar_t /Zc:forScope /Zc:inline /DNOMINMAX /D_CRT_SECURE_NO_DEPRECATE") + + # Vcpkg automatically adds `/external:W0`, but we duplicate it here because it somehow doesn't propagate to Lazperf. +- set(MESHLIB_COMMON_C_CXX_FLAGS "${MESHLIB_COMMON_C_CXX_FLAGS} /W4 /WX /external:W0 /external:env:INCLUDE") ++ set(MESHLIB_COMMON_C_CXX_FLAGS "${MESHLIB_COMMON_C_CXX_FLAGS} /W4 /external:W0 /external:env:INCLUDE") + + # Following warnings are silenced: + # !! NOTE: Sync this list with `common.props` !! diff --git a/ports/meshlib/portfile.cmake b/ports/meshlib/portfile.cmake index 14840fcf385904..346737a9d5bd96 100644 --- a/ports/meshlib/portfile.cmake +++ b/ports/meshlib/portfile.cmake @@ -13,6 +13,7 @@ vcpkg_from_github( fix-jpeg-link.patch disable-test.patch disable-openctm.patch + disable-warning-as-error.patch ) vcpkg_from_github( diff --git a/versions/m-/meshlib.json b/versions/m-/meshlib.json index 9f558bb7c68014..7e7ce732d0dba8 100644 --- a/versions/m-/meshlib.json +++ b/versions/m-/meshlib.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "dbde340653685d813c6d9e9a13519c5232217c49", + "git-tree": "0f28a8ad330d58af37e66cd2febee12ac60299da", "version": "3.1.1.92", "port-version": 0 } From 79e77efdd16dea0e0c963d6028b5a9cb988a0d0f Mon Sep 17 00:00:00 2001 From: toge Date: Mon, 2 Mar 2026 22:17:29 +0900 Subject: [PATCH 09/33] copy tools --- ports/meshlib/portfile.cmake | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ports/meshlib/portfile.cmake b/ports/meshlib/portfile.cmake index 346737a9d5bd96..3bdf65db35d434 100644 --- a/ports/meshlib/portfile.cmake +++ b/ports/meshlib/portfile.cmake @@ -49,6 +49,11 @@ vcpkg_cmake_install() vcpkg_fixup_pkgconfig() vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/MeshLib) +vcpkg_copy_tools( + TOOL_NAMES meshconv + AUTO_CLEAN +) + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share" "${CURRENT_PACKAGES_DIR}/debug/include" ) From 1f92269648e0e2b66351dda0fbd77a2b48e95ad9 Mon Sep 17 00:00:00 2001 From: toge Date: Mon, 2 Mar 2026 22:17:39 +0900 Subject: [PATCH 10/33] update versions --- versions/m-/meshlib.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/m-/meshlib.json b/versions/m-/meshlib.json index 7e7ce732d0dba8..44bcbbfab924fc 100644 --- a/versions/m-/meshlib.json +++ b/versions/m-/meshlib.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "0f28a8ad330d58af37e66cd2febee12ac60299da", + "git-tree": "30d483f857d04ec85057449102ae8c220cc5ad8e", "version": "3.1.1.92", "port-version": 0 } From f3bce6e1d05005aadf65c1467bb444a41038b0bf Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 3 Mar 2026 01:52:03 +0900 Subject: [PATCH 11/33] don't copy dll on static build --- ports/meshlib/fix-e57format.patch | 16 +++++++++------- versions/m-/meshlib.json | 2 +- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/ports/meshlib/fix-e57format.patch b/ports/meshlib/fix-e57format.patch index 411edc07c6bf5b..f75ff96020fbe0 100644 --- a/ports/meshlib/fix-e57format.patch +++ b/ports/meshlib/fix-e57format.patch @@ -1,14 +1,16 @@ diff --git a/source/MRIOExtras/CMakeLists.txt b/source/MRIOExtras/CMakeLists.txt -index ff8f459..f772ea5 100644 +index 4ee8a4e..3d447b7 100644 --- a/source/MRIOExtras/CMakeLists.txt +++ b/source/MRIOExtras/CMakeLists.txt -@@ -43,7 +43,8 @@ IF(NOT MRIOEXTRAS_NO_CTM) +@@ -44,9 +44,10 @@ IF(NOT MRIOEXTRAS_NO_CTM) ENDIF() - + IF(NOT MRIOEXTRAS_NO_E57) -- target_link_libraries(${PROJECT_NAME} PRIVATE E57Format) + find_package(E57Format CONFIG REQUIRED) -+ target_link_libraries(${PROJECT_NAME} PRIVATE E57Format) - - IF(MSVC AND DEFINED VCPKG_INSTALLED_DIR AND DEFINED VCPKG_TARGET_TRIPLET) + target_link_libraries(${PROJECT_NAME} PRIVATE E57Format) + +- IF(MSVC AND DEFINED VCPKG_INSTALLED_DIR AND DEFINED VCPKG_TARGET_TRIPLET) ++ IF(MSVC AND DEFINED VCPKG_INSTALLED_DIR AND DEFINED VCPKG_TARGET_TRIPLET AND BUILD_SHARED_LIBS) file(GLOB XERCES_DLL_RELEASE "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/bin/xerces-c_3_*.dll") + file(GLOB XERCES_DLL_DEBUG "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/bin/xerces-c_3_*.dll") + diff --git a/versions/m-/meshlib.json b/versions/m-/meshlib.json index 44bcbbfab924fc..89b1ffe8f56652 100644 --- a/versions/m-/meshlib.json +++ b/versions/m-/meshlib.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "30d483f857d04ec85057449102ae8c220cc5ad8e", + "git-tree": "0f61bc474c2fd304f27edd1e066ca46d3f414e27", "version": "3.1.1.92", "port-version": 0 } From a7f618268c5ff59b8356345282883508b2a00ccb Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 3 Mar 2026 02:10:42 +0900 Subject: [PATCH 12/33] disable PCH --- ports/meshlib/portfile.cmake | 1 + versions/m-/meshlib.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ports/meshlib/portfile.cmake b/ports/meshlib/portfile.cmake index 3bdf65db35d434..ac39d7df833dd8 100644 --- a/ports/meshlib/portfile.cmake +++ b/ports/meshlib/portfile.cmake @@ -34,6 +34,7 @@ vcpkg_cmake_configure( OPTIONS -DBUILD_TESTING=OFF -DMR_CXX_STANDARD=20 + -DMR_PCH=OFF -DMESHLIB_PYTHON_SUPPORT=OFF -DMESHLIB_BUILD_MRCUDA=OFF -DMESHLIB_BUILD_MESHVIEWER=OFF diff --git a/versions/m-/meshlib.json b/versions/m-/meshlib.json index 89b1ffe8f56652..e39b3786a1507a 100644 --- a/versions/m-/meshlib.json +++ b/versions/m-/meshlib.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "0f61bc474c2fd304f27edd1e066ca46d3f414e27", + "git-tree": "ab11d6ca7a267e366f0bc7ce10e347a4510cc635", "version": "3.1.1.92", "port-version": 0 } From 53899da974c4999608ed11ce8043b409037bdafc Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 3 Mar 2026 19:50:27 +0900 Subject: [PATCH 13/33] support 32bit --- ports/meshlib/fix-iosfwd.patch | 169 ++++++++++++++++++++++++++++++ ports/meshlib/portfile.cmake | 2 + ports/meshlib/support-32bit.patch | 14 +++ versions/m-/meshlib.json | 2 +- 4 files changed, 186 insertions(+), 1 deletion(-) create mode 100644 ports/meshlib/fix-iosfwd.patch create mode 100644 ports/meshlib/support-32bit.patch diff --git a/ports/meshlib/fix-iosfwd.patch b/ports/meshlib/fix-iosfwd.patch new file mode 100644 index 00000000000000..59a3080e166991 --- /dev/null +++ b/ports/meshlib/fix-iosfwd.patch @@ -0,0 +1,169 @@ +diff --git a/source/MRMesh/MRAffineXf.h b/source/MRMesh/MRAffineXf.h +index b2b1209..d4ced0c 100644 +--- a/source/MRMesh/MRAffineXf.h ++++ b/source/MRMesh/MRAffineXf.h +@@ -2,7 +2,7 @@ + + #include "MRMacros.h" + #include "MRMeshFwd.h" +-#include ++#include + #include + + #if MR_COMPILING_ANY_BINDINGS +diff --git a/source/MRMesh/MRBitSet.h b/source/MRMesh/MRBitSet.h +index 246eddb..08a9a84 100644 +--- a/source/MRMesh/MRBitSet.h ++++ b/source/MRMesh/MRBitSet.h +@@ -6,7 +6,7 @@ + #include "MRVector.h" + #include "MRPch/MRBindingMacros.h" + #include +-#include ++#include + #include + + namespace MR +diff --git a/source/MRMesh/MRBox.h b/source/MRMesh/MRBox.h +index 9f728b7..d4efa96 100644 +--- a/source/MRMesh/MRBox.h ++++ b/source/MRMesh/MRBox.h +@@ -6,7 +6,7 @@ + #include "MRVectorTraits.h" + #include + #include +-#include ++#include + #include + #include + +diff --git a/source/MRMesh/MRLine.h b/source/MRMesh/MRLine.h +index 318009c..89feab0 100644 +--- a/source/MRMesh/MRLine.h ++++ b/source/MRMesh/MRLine.h +@@ -1,7 +1,7 @@ + #pragma once + + #include "MRAffineXf.h" +-#include ++#include + + namespace MR + { +diff --git a/source/MRMesh/MRMatrix2.h b/source/MRMesh/MRMatrix2.h +index cd0ffba..157eca3 100644 +--- a/source/MRMesh/MRMatrix2.h ++++ b/source/MRMesh/MRMatrix2.h +@@ -3,7 +3,7 @@ + #include "MRVector2.h" + #include "MRConstants.h" + +-#include ++#include + + namespace MR + { +diff --git a/source/MRMesh/MRMatrix3.h b/source/MRMesh/MRMatrix3.h +index 2af8726..ff144cb 100644 +--- a/source/MRMesh/MRMatrix3.h ++++ b/source/MRMesh/MRMatrix3.h +@@ -3,7 +3,7 @@ + #include "MRMacros.h" + #include "MRVector3.h" + #include "MRConstants.h" +-#include ++#include + + namespace MR + { +diff --git a/source/MRMesh/MRMatrix4.h b/source/MRMesh/MRMatrix4.h +index 1ca164d..d619681 100644 +--- a/source/MRMesh/MRMatrix4.h ++++ b/source/MRMesh/MRMatrix4.h +@@ -3,7 +3,7 @@ + #include "MRMacros.h" + #include "MRVector4.h" + #include +-#include ++#include + #include + + namespace MR +diff --git a/source/MRMesh/MRPlane3.h b/source/MRMesh/MRPlane3.h +index 339c591..9bff269 100644 +--- a/source/MRMesh/MRPlane3.h ++++ b/source/MRMesh/MRPlane3.h +@@ -2,7 +2,7 @@ + + #include "MRVector3.h" + +-#include ++#include + #if MR_HAS_REQUIRES + #include "MRVectorTraits.h" + #include +diff --git a/source/MRMesh/MRPointOnFace.h b/source/MRMesh/MRPointOnFace.h +index 597e773..bf9b397 100644 +--- a/source/MRMesh/MRPointOnFace.h ++++ b/source/MRMesh/MRPointOnFace.h +@@ -3,7 +3,7 @@ + #include "MRVector3.h" + #include "MRId.h" + +-#include ++#include + + namespace MR + { +diff --git a/source/MRMesh/MRTriPoint.h b/source/MRMesh/MRTriPoint.h +index b3dd964..3bb261f 100644 +--- a/source/MRMesh/MRTriPoint.h ++++ b/source/MRMesh/MRTriPoint.h +@@ -3,7 +3,7 @@ + #include "MRVector3.h" + #include "MRSegmPoint.h" + #include "MRMesh/MRMacros.h" +-#include ++#include + + namespace MR + { +diff --git a/source/MRMesh/MRVector2.h b/source/MRMesh/MRVector2.h +index df7f1ac..aefa6a3 100644 +--- a/source/MRMesh/MRVector2.h ++++ b/source/MRMesh/MRVector2.h +@@ -7,7 +7,7 @@ + #include + #include + #include +-#include ++#include + #include + + namespace MR +diff --git a/source/MRMesh/MRVector3.h b/source/MRMesh/MRVector3.h +index 75b9b48..0456fae 100644 +--- a/source/MRMesh/MRVector3.h ++++ b/source/MRMesh/MRVector3.h +@@ -8,7 +8,7 @@ + #include + #include + #include +-#include ++#include + #include + #if MR_HAS_REQUIRES + #include +diff --git a/source/MRMesh/MRVector4.h b/source/MRMesh/MRVector4.h +index 135d932..3604646 100644 +--- a/source/MRMesh/MRVector4.h ++++ b/source/MRMesh/MRVector4.h +@@ -1,7 +1,7 @@ + #pragma once + + #include +-#include ++#include + #include + #include "MRPch/MRBindingMacros.h" + #include "MRMesh/MRMacros.h" diff --git a/ports/meshlib/portfile.cmake b/ports/meshlib/portfile.cmake index ac39d7df833dd8..c5518df54d76c7 100644 --- a/ports/meshlib/portfile.cmake +++ b/ports/meshlib/portfile.cmake @@ -14,6 +14,8 @@ vcpkg_from_github( disable-test.patch disable-openctm.patch disable-warning-as-error.patch + support-32bit.patch + fix-iosfwd.patch ) vcpkg_from_github( diff --git a/ports/meshlib/support-32bit.patch b/ports/meshlib/support-32bit.patch new file mode 100644 index 00000000000000..50605139d0a947 --- /dev/null +++ b/ports/meshlib/support-32bit.patch @@ -0,0 +1,14 @@ +diff --git a/source/MRMesh/MRId.h b/source/MRMesh/MRId.h +index b3c0747..7677742 100644 +--- a/source/MRMesh/MRId.h ++++ b/source/MRMesh/MRId.h +@@ -91,7 +91,9 @@ public: + constexpr Id( UndirectedEdgeId u ) noexcept : id_( (ValueType)u << 1 ) { assert( u.valid() ); } + explicit constexpr Id( ValueType i ) noexcept : id_( i ) { } + explicit constexpr Id( unsigned int i ) noexcept : id_( i ) { } ++#if __SIZE_MAX__ != __UINT32_MAX__ + explicit constexpr Id( size_t i ) noexcept : id_( ValueType( i ) ) { } ++#endif + constexpr operator ValueType() const { return id_; } + constexpr bool valid() const { return id_ >= 0; } + explicit constexpr operator bool() const { return id_ >= 0; } diff --git a/versions/m-/meshlib.json b/versions/m-/meshlib.json index e39b3786a1507a..c9ea656600da2e 100644 --- a/versions/m-/meshlib.json +++ b/versions/m-/meshlib.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "ab11d6ca7a267e366f0bc7ce10e347a4510cc635", + "git-tree": "f1fc41d54400c043301fe8aedc3b5b4950943035", "version": "3.1.1.92", "port-version": 0 } From afe08e331f8ce4dfa0d27507917839b93ca0906d Mon Sep 17 00:00:00 2001 From: toge Date: Thu, 5 Mar 2026 02:20:36 +0900 Subject: [PATCH 14/33] support 32bit (more) --- ports/meshlib/support-32bit.patch | 22 +++++++++++++++++++++- versions/m-/meshlib.json | 2 +- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/ports/meshlib/support-32bit.patch b/ports/meshlib/support-32bit.patch index 50605139d0a947..00f7411e9a1468 100644 --- a/ports/meshlib/support-32bit.patch +++ b/ports/meshlib/support-32bit.patch @@ -1,5 +1,5 @@ diff --git a/source/MRMesh/MRId.h b/source/MRMesh/MRId.h -index b3c0747..7677742 100644 +index b3c0747..b02ad32 100644 --- a/source/MRMesh/MRId.h +++ b/source/MRMesh/MRId.h @@ -91,7 +91,9 @@ public: @@ -12,3 +12,23 @@ index b3c0747..7677742 100644 constexpr operator ValueType() const { return id_; } constexpr bool valid() const { return id_ >= 0; } explicit constexpr operator bool() const { return id_ >= 0; } +@@ -181,15 +183,19 @@ template + inline constexpr Id operator + ( Id id, int a ) { return Id{ id.get() + a }; } + template + inline constexpr Id operator + ( Id id, unsigned int a ) { return Id{ id.get() + a }; } ++#if __SIZE_MAX__ != __UINT32_MAX__ + template + inline constexpr Id operator + ( Id id, size_t a ) { return Id{ id.get() + a }; } ++#endif + + template + inline constexpr Id operator - ( Id id, int a ) { return Id{ id.get() - a }; } + template + inline constexpr Id operator - ( Id id, unsigned int a ) { return Id{ id.get() - a }; } ++#if __SIZE_MAX__ != __UINT32_MAX__ + template + inline constexpr Id operator - ( Id id, size_t a ) { return Id{ id.get() - a }; } ++#endif + + inline constexpr FaceId operator ""_f( unsigned long long i ) noexcept { return FaceId{ (int)i }; } + inline constexpr VertId operator ""_v( unsigned long long i ) noexcept { return VertId{ (int)i }; } diff --git a/versions/m-/meshlib.json b/versions/m-/meshlib.json index c9ea656600da2e..6b5dfe138839a5 100644 --- a/versions/m-/meshlib.json +++ b/versions/m-/meshlib.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "f1fc41d54400c043301fe8aedc3b5b4950943035", + "git-tree": "e998c45b4560b811c887f1cc6c4c18a3615c04bc", "version": "3.1.1.92", "port-version": 0 } From d0d895bd6c211dfead73d10410a69cb756352d40 Mon Sep 17 00:00:00 2001 From: toge Date: Sun, 8 Mar 2026 21:39:55 +0900 Subject: [PATCH 15/33] drop arm32 android --- ports/meshlib/portfile.cmake | 1 - ports/meshlib/support-32bit.patch | 34 ------------------------------- ports/meshlib/vcpkg.json | 1 + versions/m-/meshlib.json | 2 +- 4 files changed, 2 insertions(+), 36 deletions(-) delete mode 100644 ports/meshlib/support-32bit.patch diff --git a/ports/meshlib/portfile.cmake b/ports/meshlib/portfile.cmake index c5518df54d76c7..693817a7831e40 100644 --- a/ports/meshlib/portfile.cmake +++ b/ports/meshlib/portfile.cmake @@ -14,7 +14,6 @@ vcpkg_from_github( disable-test.patch disable-openctm.patch disable-warning-as-error.patch - support-32bit.patch fix-iosfwd.patch ) diff --git a/ports/meshlib/support-32bit.patch b/ports/meshlib/support-32bit.patch deleted file mode 100644 index 00f7411e9a1468..00000000000000 --- a/ports/meshlib/support-32bit.patch +++ /dev/null @@ -1,34 +0,0 @@ -diff --git a/source/MRMesh/MRId.h b/source/MRMesh/MRId.h -index b3c0747..b02ad32 100644 ---- a/source/MRMesh/MRId.h -+++ b/source/MRMesh/MRId.h -@@ -91,7 +91,9 @@ public: - constexpr Id( UndirectedEdgeId u ) noexcept : id_( (ValueType)u << 1 ) { assert( u.valid() ); } - explicit constexpr Id( ValueType i ) noexcept : id_( i ) { } - explicit constexpr Id( unsigned int i ) noexcept : id_( i ) { } -+#if __SIZE_MAX__ != __UINT32_MAX__ - explicit constexpr Id( size_t i ) noexcept : id_( ValueType( i ) ) { } -+#endif - constexpr operator ValueType() const { return id_; } - constexpr bool valid() const { return id_ >= 0; } - explicit constexpr operator bool() const { return id_ >= 0; } -@@ -181,15 +183,19 @@ template - inline constexpr Id operator + ( Id id, int a ) { return Id{ id.get() + a }; } - template - inline constexpr Id operator + ( Id id, unsigned int a ) { return Id{ id.get() + a }; } -+#if __SIZE_MAX__ != __UINT32_MAX__ - template - inline constexpr Id operator + ( Id id, size_t a ) { return Id{ id.get() + a }; } -+#endif - - template - inline constexpr Id operator - ( Id id, int a ) { return Id{ id.get() - a }; } - template - inline constexpr Id operator - ( Id id, unsigned int a ) { return Id{ id.get() - a }; } -+#if __SIZE_MAX__ != __UINT32_MAX__ - template - inline constexpr Id operator - ( Id id, size_t a ) { return Id{ id.get() - a }; } -+#endif - - inline constexpr FaceId operator ""_f( unsigned long long i ) noexcept { return FaceId{ (int)i }; } - inline constexpr VertId operator ""_v( unsigned long long i ) noexcept { return VertId{ (int)i }; } diff --git a/ports/meshlib/vcpkg.json b/ports/meshlib/vcpkg.json index 442ad901b208f8..7c4e26d80a037b 100644 --- a/ports/meshlib/vcpkg.json +++ b/ports/meshlib/vcpkg.json @@ -4,6 +4,7 @@ "description": "Mesh processing library", "homepage": "https://meshlib.io/", "license": null, + "supports": "!(android & arm32)", "dependencies": [ "blosc", "boost", diff --git a/versions/m-/meshlib.json b/versions/m-/meshlib.json index 6b5dfe138839a5..36e9ef31c3fd70 100644 --- a/versions/m-/meshlib.json +++ b/versions/m-/meshlib.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "e998c45b4560b811c887f1cc6c4c18a3615c04bc", + "git-tree": "5d39ac742ae6a52fbca255e833ad965a5b69aa3c", "version": "3.1.1.92", "port-version": 0 } From 11ee5246b2aff46d76c183114259fa2721fe095d Mon Sep 17 00:00:00 2001 From: toge Date: Mon, 9 Mar 2026 14:01:12 +0900 Subject: [PATCH 16/33] fix ITERATOR_DEBUG_LEVEL --- ports/meshlib/fix-iterator_debug_level.patch | 14 ++++++++++++++ ports/meshlib/portfile.cmake | 1 + ports/meshlib/vcpkg.json | 2 +- versions/m-/meshlib.json | 2 +- 4 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 ports/meshlib/fix-iterator_debug_level.patch diff --git a/ports/meshlib/fix-iterator_debug_level.patch b/ports/meshlib/fix-iterator_debug_level.patch new file mode 100644 index 00000000000000..3d35c7ad9c2019 --- /dev/null +++ b/ports/meshlib/fix-iterator_debug_level.patch @@ -0,0 +1,14 @@ +diff --git a/cmake/Modules/CompilerOptions.cmake b/cmake/Modules/CompilerOptions.cmake +index 0817b2b..d1137e4 100644 +--- a/cmake/Modules/CompilerOptions.cmake ++++ b/cmake/Modules/CompilerOptions.cmake +@@ -114,7 +114,8 @@ ENDIF() + + IF(MSVC) + add_definitions(-DUNICODE -D_UNICODE) +- add_definitions(-D_ITERATOR_DEBUG_LEVEL=0) ++ add_definitions(-D_ITERATOR_DEBUG_LEVEL=$,2,0>) ++ add_definitions(-DMR_ITERATOR_DEBUG_LEVEL=$,2,0>) + ENDIF() + + IF(NOT MSVC) diff --git a/ports/meshlib/portfile.cmake b/ports/meshlib/portfile.cmake index 693817a7831e40..0b9155a233a51a 100644 --- a/ports/meshlib/portfile.cmake +++ b/ports/meshlib/portfile.cmake @@ -15,6 +15,7 @@ vcpkg_from_github( disable-openctm.patch disable-warning-as-error.patch fix-iosfwd.patch + fix-iterator_debug_level.patch ) vcpkg_from_github( diff --git a/ports/meshlib/vcpkg.json b/ports/meshlib/vcpkg.json index 7c4e26d80a037b..9024f717a91590 100644 --- a/ports/meshlib/vcpkg.json +++ b/ports/meshlib/vcpkg.json @@ -4,7 +4,7 @@ "description": "Mesh processing library", "homepage": "https://meshlib.io/", "license": null, - "supports": "!(android & arm32)", + "supports": "!(x86 | arm32)", "dependencies": [ "blosc", "boost", diff --git a/versions/m-/meshlib.json b/versions/m-/meshlib.json index 36e9ef31c3fd70..4d8be0e426dc23 100644 --- a/versions/m-/meshlib.json +++ b/versions/m-/meshlib.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "5d39ac742ae6a52fbca255e833ad965a5b69aa3c", + "git-tree": "a03aa261ea93ce7c9d8a67e7b45b6df8028b930e", "version": "3.1.1.92", "port-version": 0 } From 89a86a12961aa5f2c3a9740c787582c27bf1f642 Mon Sep 17 00:00:00 2001 From: toge Date: Mon, 9 Mar 2026 22:01:47 +0900 Subject: [PATCH 17/33] fix tinyxml2 link on msvc --- ports/meshlib/fix-tinyxml2-link.patch | 14 ++++++++++++++ ports/meshlib/portfile.cmake | 1 + versions/m-/meshlib.json | 2 +- 3 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 ports/meshlib/fix-tinyxml2-link.patch diff --git a/ports/meshlib/fix-tinyxml2-link.patch b/ports/meshlib/fix-tinyxml2-link.patch new file mode 100644 index 00000000000000..f6470fc08f0d61 --- /dev/null +++ b/ports/meshlib/fix-tinyxml2-link.patch @@ -0,0 +1,14 @@ +diff --git a/source/MRIOExtras/CMakeLists.txt b/source/MRIOExtras/CMakeLists.txt +index 7808659..0a03903 100644 +--- a/source/MRIOExtras/CMakeLists.txt ++++ b/source/MRIOExtras/CMakeLists.txt +@@ -39,7 +39,8 @@ target_link_libraries(${PROJECT_NAME} + ) + + IF(NOT MRIOEXTRAS_NO_XML) +- target_link_libraries(${PROJECT_NAME} PRIVATE tinyxml2) ++ find_package(tinyxml2 CONFIG REQUIRED) ++ target_link_libraries(${PROJECT_NAME} PRIVATE tinyxml2::tinyxml2) + ENDIF() + + IF(NOT MRIOEXTRAS_NO_CTM) diff --git a/ports/meshlib/portfile.cmake b/ports/meshlib/portfile.cmake index 0b9155a233a51a..5c4453dd9940d5 100644 --- a/ports/meshlib/portfile.cmake +++ b/ports/meshlib/portfile.cmake @@ -16,6 +16,7 @@ vcpkg_from_github( disable-warning-as-error.patch fix-iosfwd.patch fix-iterator_debug_level.patch + fix-tinyxml2-link.patch ) vcpkg_from_github( diff --git a/versions/m-/meshlib.json b/versions/m-/meshlib.json index 4d8be0e426dc23..566882086f1c52 100644 --- a/versions/m-/meshlib.json +++ b/versions/m-/meshlib.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "a03aa261ea93ce7c9d8a67e7b45b6df8028b930e", + "git-tree": "b2c5a88e13caf41a5b5d264b3301a7808f82d40f", "version": "3.1.1.92", "port-version": 0 } From e014cb0a5be828812d184ae80141c994199eee70 Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 10 Mar 2026 01:26:13 +0900 Subject: [PATCH 18/33] fix blosc link --- ports/meshlib/fix-exported-include-dirs.patch | 8 ++++---- ports/meshlib/fix-linux-openvdb-blosc-link.patch | 4 ++-- versions/m-/meshlib.json | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ports/meshlib/fix-exported-include-dirs.patch b/ports/meshlib/fix-exported-include-dirs.patch index a9fbbe67cdc76d..39860a10be49bc 100644 --- a/ports/meshlib/fix-exported-include-dirs.patch +++ b/ports/meshlib/fix-exported-include-dirs.patch @@ -17,9 +17,9 @@ diff --git a/source/MRIOExtras/CMakeLists.txt b/source/MRIOExtras/CMakeLists.txt --- a/source/MRIOExtras/CMakeLists.txt +++ b/source/MRIOExtras/CMakeLists.txt @@ -24,6 +24,12 @@ add_library(${PROJECT_NAME} SHARED ${SOURCES} ${HEADERS}) - + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config_cmake.h.in ${CMAKE_CURRENT_SOURCE_DIR}/config_cmake.h) - + +target_include_directories(${PROJECT_NAME} + PUBLIC + $ @@ -44,7 +44,7 @@ diff --git a/source/MRVoxels/CMakeLists.txt b/source/MRVoxels/CMakeLists.txt + $ +) # required for static linking - IF(EMSCRIPTEN OR UNIX) + find_package(blosc CONFIG REQUIRED) diff --git a/source/MRSymbolMesh/CMakeLists.txt b/source/MRSymbolMesh/CMakeLists.txt --- a/source/MRSymbolMesh/CMakeLists.txt +++ b/source/MRSymbolMesh/CMakeLists.txt @@ -59,6 +59,6 @@ diff --git a/source/MRSymbolMesh/CMakeLists.txt b/source/MRSymbolMesh/CMakeLists + $ + $ + ) - + install( TARGETS ${PROJECT_NAME} diff --git a/ports/meshlib/fix-linux-openvdb-blosc-link.patch b/ports/meshlib/fix-linux-openvdb-blosc-link.patch index d06f267f987da0..9f1c6fbaed66f8 100644 --- a/ports/meshlib/fix-linux-openvdb-blosc-link.patch +++ b/ports/meshlib/fix-linux-openvdb-blosc-link.patch @@ -8,8 +8,8 @@ index 8b4df1f..d302e41 100644 # required for static linking -IF(EMSCRIPTEN) - target_link_libraries(${PROJECT_NAME} PRIVATE blosc) -+IF(EMSCRIPTEN OR UNIX) -+ find_package(blosc CONFIG REQUIRED) ++find_package(blosc CONFIG REQUIRED) ++IF(OpenVDB_USES_BLOSC AND TARGET blosc_static) + target_link_libraries(${PROJECT_NAME} PRIVATE blosc_static) ENDIF() diff --git a/versions/m-/meshlib.json b/versions/m-/meshlib.json index 566882086f1c52..2338dd826b9f0b 100644 --- a/versions/m-/meshlib.json +++ b/versions/m-/meshlib.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "b2c5a88e13caf41a5b5d264b3301a7808f82d40f", + "git-tree": "56c598552a0cbfeb2346a3d288e1fec2e15143f5", "version": "3.1.1.92", "port-version": 0 } From 465265c4dedc4982628143042f0a1d2515d88e3b Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 10 Mar 2026 02:03:23 +0900 Subject: [PATCH 19/33] remove bin folders in windows static build --- ports/meshlib/portfile.cmake | 5 +++++ versions/m-/meshlib.json | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ports/meshlib/portfile.cmake b/ports/meshlib/portfile.cmake index 5c4453dd9940d5..110d337654747f 100644 --- a/ports/meshlib/portfile.cmake +++ b/ports/meshlib/portfile.cmake @@ -61,4 +61,9 @@ vcpkg_copy_tools( file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share" "${CURRENT_PACKAGES_DIR}/debug/include" ) +if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin" + "${CURRENT_PACKAGES_DIR}/bin" + ) +endif() vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") diff --git a/versions/m-/meshlib.json b/versions/m-/meshlib.json index 2338dd826b9f0b..c81a1d18ffd04f 100644 --- a/versions/m-/meshlib.json +++ b/versions/m-/meshlib.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "56c598552a0cbfeb2346a3d288e1fec2e15143f5", + "git-tree": "202d863d0d4e12604134eff4b7cab4f6d157d125", "version": "3.1.1.92", "port-version": 0 } From 182d6c9da4857e6b8cb1208fe2efa1ed385bb2f2 Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 10 Mar 2026 10:51:58 +0900 Subject: [PATCH 20/33] disable _ITERATOR_DEBUG_LEVEL --- ports/meshlib/fix-iterator_debug_level.patch | 7 +++---- versions/m-/meshlib.json | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/ports/meshlib/fix-iterator_debug_level.patch b/ports/meshlib/fix-iterator_debug_level.patch index 3d35c7ad9c2019..75ad4dda815dab 100644 --- a/ports/meshlib/fix-iterator_debug_level.patch +++ b/ports/meshlib/fix-iterator_debug_level.patch @@ -2,13 +2,12 @@ diff --git a/cmake/Modules/CompilerOptions.cmake b/cmake/Modules/CompilerOptions index 0817b2b..d1137e4 100644 --- a/cmake/Modules/CompilerOptions.cmake +++ b/cmake/Modules/CompilerOptions.cmake -@@ -114,7 +114,8 @@ ENDIF() - +@@ -114,7 +114,7 @@ ENDIF() + IF(MSVC) add_definitions(-DUNICODE -D_UNICODE) - add_definitions(-D_ITERATOR_DEBUG_LEVEL=0) -+ add_definitions(-D_ITERATOR_DEBUG_LEVEL=$,2,0>) + add_definitions(-DMR_ITERATOR_DEBUG_LEVEL=$,2,0>) ENDIF() - + IF(NOT MSVC) diff --git a/versions/m-/meshlib.json b/versions/m-/meshlib.json index c81a1d18ffd04f..9084bc0133ea98 100644 --- a/versions/m-/meshlib.json +++ b/versions/m-/meshlib.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "202d863d0d4e12604134eff4b7cab4f6d157d125", + "git-tree": "4865840409a176bf5cae9dec194d63fcacefb304", "version": "3.1.1.92", "port-version": 0 } From 37da43dc574921105ac5e1d1667775857e61e1ba Mon Sep 17 00:00:00 2001 From: toge Date: Tue, 10 Mar 2026 11:41:31 +0900 Subject: [PATCH 21/33] disable itetarot_debug_level check --- ports/meshlib/fix-iterator_debug_level.patch | 15 +++++++++++++++ versions/m-/meshlib.json | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/ports/meshlib/fix-iterator_debug_level.patch b/ports/meshlib/fix-iterator_debug_level.patch index 75ad4dda815dab..73fe8415f772d5 100644 --- a/ports/meshlib/fix-iterator_debug_level.patch +++ b/ports/meshlib/fix-iterator_debug_level.patch @@ -11,3 +11,18 @@ index 0817b2b..d1137e4 100644 ENDIF() IF(NOT MSVC) + +diff --git a/source/MRMesh/MRMeshFwd.h b/source/MRMesh/MRMeshFwd.h +index a0f4ff3..6a4b794 100644 +--- a/source/MRMesh/MRMeshFwd.h ++++ b/source/MRMesh/MRMeshFwd.h +@@ -18,7 +18,7 @@ + // additionally MR_ITERATOR_DEBUG_LEVEL with the same value to indicate that it is done intentionally + // (and you are ok with up to 100x slowdown). + // +-#if defined _MSC_VER ++#if 0 + #if !defined _ITERATOR_DEBUG_LEVEL + #define _ITERATOR_DEBUG_LEVEL 0 + #endif +/tmp/bbb.patch diff --git a/versions/m-/meshlib.json b/versions/m-/meshlib.json index 9084bc0133ea98..667d76ef95a0be 100644 --- a/versions/m-/meshlib.json +++ b/versions/m-/meshlib.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "4865840409a176bf5cae9dec194d63fcacefb304", + "git-tree": "719178e99714a4551bb7c2cdf2d80e9338d1786b", "version": "3.1.1.92", "port-version": 0 } From f9a6f07ad41883f453c4e9bb29e575d99d99efe7 Mon Sep 17 00:00:00 2001 From: toge Date: Wed, 11 Mar 2026 12:07:58 +0900 Subject: [PATCH 22/33] disable vcpkg in vcpkg --- ports/meshlib/portfile.cmake | 2 +- versions/m-/meshlib.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/meshlib/portfile.cmake b/ports/meshlib/portfile.cmake index 110d337654747f..3c404e78b893bb 100644 --- a/ports/meshlib/portfile.cmake +++ b/ports/meshlib/portfile.cmake @@ -43,7 +43,7 @@ vcpkg_cmake_configure( -DMESHLIB_BUILD_MESHVIEWER=OFF -DMESHLIB_BUILD_MRVIEWER=OFF -DMESHLIB_BUILD_PYTHON_MODULES=OFF - -DMESHLIB_USE_VCPKG=ON + -DMESHLIB_USE_VCPKG=OFF -DMRMESH_NO_GTEST=ON -DMRIOEXTRAS_NO_CTM=ON # API compatibility issue with openctm diff --git a/versions/m-/meshlib.json b/versions/m-/meshlib.json index 667d76ef95a0be..66ee2321836838 100644 --- a/versions/m-/meshlib.json +++ b/versions/m-/meshlib.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "719178e99714a4551bb7c2cdf2d80e9338d1786b", + "git-tree": "84f516b3caa6ff9ab8546a18675380f5ee48cb42", "version": "3.1.1.92", "port-version": 0 } From bc19a2e4962c9988545d3fb70d947d197f38c385 Mon Sep 17 00:00:00 2001 From: toge Date: Wed, 11 Mar 2026 16:21:53 +0900 Subject: [PATCH 23/33] fix install dirs --- ports/meshlib/fix-install-dirs.patch | 13 +++++++++++++ ports/meshlib/portfile.cmake | 1 + versions/m-/meshlib.json | 2 +- 3 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 ports/meshlib/fix-install-dirs.patch diff --git a/ports/meshlib/fix-install-dirs.patch b/ports/meshlib/fix-install-dirs.patch new file mode 100644 index 00000000000000..b254c437817162 --- /dev/null +++ b/ports/meshlib/fix-install-dirs.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index e9751cb..3cfd976 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -161,7 +161,7 @@ ENDIF() + message("version: ${MESHLIB_VERSION}") + + set(MESHLIB_LIB_SUBDIR "${MESHLIB_PROJECT_NAME}" CACHE STRING "Subdirectory in the library directory to place the MeshLib libraries at") +-IF(MESHLIB_USE_VCPKG) ++IF(TRUE) + # use OS-agnostic directory structure for vcpkg + set(MR_BIN_DIR bin) + set(MR_INCLUDE_DIR include/MeshLib) diff --git a/ports/meshlib/portfile.cmake b/ports/meshlib/portfile.cmake index 3c404e78b893bb..d235f471aefcde 100644 --- a/ports/meshlib/portfile.cmake +++ b/ports/meshlib/portfile.cmake @@ -17,6 +17,7 @@ vcpkg_from_github( fix-iosfwd.patch fix-iterator_debug_level.patch fix-tinyxml2-link.patch + fix-install-dirs.patch ) vcpkg_from_github( diff --git a/versions/m-/meshlib.json b/versions/m-/meshlib.json index 66ee2321836838..897880948aad08 100644 --- a/versions/m-/meshlib.json +++ b/versions/m-/meshlib.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "84f516b3caa6ff9ab8546a18675380f5ee48cb42", + "git-tree": "d6958c3be1d491394809e6ca7694d43910c23982", "version": "3.1.1.92", "port-version": 0 } From 96a34e20c6eadf838418d4c83c9e324ab7424a31 Mon Sep 17 00:00:00 2001 From: toge Date: Wed, 11 Mar 2026 18:36:20 +0900 Subject: [PATCH 24/33] find pkgconfig --- ports/meshlib/portfile.cmake | 3 +++ versions/m-/meshlib.json | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ports/meshlib/portfile.cmake b/ports/meshlib/portfile.cmake index d235f471aefcde..c31b3df805a956 100644 --- a/ports/meshlib/portfile.cmake +++ b/ports/meshlib/portfile.cmake @@ -32,6 +32,9 @@ vcpkg_from_github( file(REMOVE_RECURSE "${SOURCE_PATH}/thirdparty/laz-perf") file(COPY "${LAZ_PERF_SOURCE_PATH}/" DESTINATION "${SOURCE_PATH}/thirdparty/laz-perf") +vcpkg_find_acquire_program(PKGCONFIG) +set(ENV{PKG_CONFIG} "${PKGCONFIG}") + vcpkg_cmake_configure( SOURCE_PATH "${SOURCE_PATH}" DISABLE_PARALLEL_CONFIGURE diff --git a/versions/m-/meshlib.json b/versions/m-/meshlib.json index 897880948aad08..3a8cca5cc18153 100644 --- a/versions/m-/meshlib.json +++ b/versions/m-/meshlib.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "d6958c3be1d491394809e6ca7694d43910c23982", + "git-tree": "7598f673056f51968d7e3fd2148d4577cded42c4", "version": "3.1.1.92", "port-version": 0 } From 518cc5614c67b90a3669b43ec202a98b0712310a Mon Sep 17 00:00:00 2001 From: toge Date: Wed, 11 Mar 2026 21:44:34 +0900 Subject: [PATCH 25/33] devendoring parallel-hashmap, tinygltf --- .../devendoring-parallel-hashmap.patch | 40 +++++++++++++++++++ ports/meshlib/portfile.cmake | 1 + versions/m-/meshlib.json | 2 +- 3 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 ports/meshlib/devendoring-parallel-hashmap.patch diff --git a/ports/meshlib/devendoring-parallel-hashmap.patch b/ports/meshlib/devendoring-parallel-hashmap.patch new file mode 100644 index 00000000000000..549964056b6884 --- /dev/null +++ b/ports/meshlib/devendoring-parallel-hashmap.patch @@ -0,0 +1,40 @@ +diff --git a/source/MRMesh/CMakeLists.txt b/source/MRMesh/CMakeLists.txt +index 8d2464f..9169b52 100644 +--- a/source/MRMesh/CMakeLists.txt ++++ b/source/MRMesh/CMakeLists.txt +@@ -69,7 +69,7 @@ target_include_directories(${PROJECT_NAME} + PUBLIC + $ + $ +- $ ++ $ + ) + + IF(APPLE) +diff --git a/thirdparty/CMakeLists.txt b/thirdparty/CMakeLists.txt +index 4aca508..e1e89bd 100644 +--- a/thirdparty/CMakeLists.txt ++++ b/thirdparty/CMakeLists.txt +@@ -83,9 +83,8 @@ IF(NOT APPLE AND NOT MR_EMSCRIPTEN) + ENDIF() + ENDIF() + +- +-option(PHMAP_INSTALL "" ON) +-add_subdirectory(./parallel-hashmap) ++find_path(PARALLEL_HASHMAP_INCLUDE_DIRS "parallel_hashmap/btree.h") ++include_directories(${PARALLEL_HASHMAP_INCLUDE_DIRS}) + + IF(EMSCRIPTEN) + add_subdirectory(./expected ./expected) +@@ -161,8 +160,8 @@ IF(NOT MR_EMSCRIPTEN) + add_subdirectory(./mrbind-pybind11) + ENDIF() + +-set(TINYGLTF_INSTALL ON) +-add_subdirectory(./tinygltf) ++find_path(TINYGLTF_INCLUDE_DIRS "tiny_gltf.h") ++include_directories(${TINYGLTF_INCLUDE_DIRS}) + + set(WITH_TESTS OFF CACHE BOOL "") + set(WITH_EMBIND OFF CACHE BOOL "") diff --git a/ports/meshlib/portfile.cmake b/ports/meshlib/portfile.cmake index c31b3df805a956..342e1e146cf96d 100644 --- a/ports/meshlib/portfile.cmake +++ b/ports/meshlib/portfile.cmake @@ -18,6 +18,7 @@ vcpkg_from_github( fix-iterator_debug_level.patch fix-tinyxml2-link.patch fix-install-dirs.patch + devendoring-parallel-hashmap.patch ) vcpkg_from_github( diff --git a/versions/m-/meshlib.json b/versions/m-/meshlib.json index 3a8cca5cc18153..28f39463dd1db7 100644 --- a/versions/m-/meshlib.json +++ b/versions/m-/meshlib.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "7598f673056f51968d7e3fd2148d4577cded42c4", + "git-tree": "399528ce68e6d7f9b5199dc74e48e996dfd15505", "version": "3.1.1.92", "port-version": 0 } From 53fae17e66b0f89f877e495e3a37d7988cd4a4b2 Mon Sep 17 00:00:00 2001 From: toge Date: Wed, 11 Mar 2026 23:20:46 +0900 Subject: [PATCH 26/33] remove unused patch --- ports/meshlib/disable-test.patch | 12 ------------ ports/meshlib/portfile.cmake | 1 - versions/m-/meshlib.json | 2 +- 3 files changed, 1 insertion(+), 14 deletions(-) delete mode 100644 ports/meshlib/disable-test.patch diff --git a/ports/meshlib/disable-test.patch b/ports/meshlib/disable-test.patch deleted file mode 100644 index c71f1df3e18a12..00000000000000 --- a/ports/meshlib/disable-test.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/source/MRPch/MRPch.h b/source/MRPch/MRPch.h -index 794d984..57502c6 100644 ---- a/source/MRPch/MRPch.h -+++ b/source/MRPch/MRPch.h -@@ -43,7 +43,6 @@ - #include - #endif - --#include - - #ifdef _WIN32 - #pragma warning(push) diff --git a/ports/meshlib/portfile.cmake b/ports/meshlib/portfile.cmake index 342e1e146cf96d..6d8d3b67a44977 100644 --- a/ports/meshlib/portfile.cmake +++ b/ports/meshlib/portfile.cmake @@ -11,7 +11,6 @@ vcpkg_from_github( fix-e57format.patch fix-exported-include-dirs.patch fix-jpeg-link.patch - disable-test.patch disable-openctm.patch disable-warning-as-error.patch fix-iosfwd.patch diff --git a/versions/m-/meshlib.json b/versions/m-/meshlib.json index 28f39463dd1db7..312fd163ddb985 100644 --- a/versions/m-/meshlib.json +++ b/versions/m-/meshlib.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "399528ce68e6d7f9b5199dc74e48e996dfd15505", + "git-tree": "2e800a8e5345392817380a09f5b44032d3134adb", "version": "3.1.1.92", "port-version": 0 } From a21934f33b9a593f6a0dc2c3854c9fb8dd0f5448 Mon Sep 17 00:00:00 2001 From: toge Date: Fri, 13 Mar 2026 17:10:40 +0900 Subject: [PATCH 27/33] merge devendoring patche files --- ports/meshlib/devendoring.patch | 124 ++++++++++++++++++++++++++++++++ ports/meshlib/portfile.cmake | 8 +-- versions/m-/meshlib.json | 2 +- 3 files changed, 126 insertions(+), 8 deletions(-) create mode 100644 ports/meshlib/devendoring.patch diff --git a/ports/meshlib/devendoring.patch b/ports/meshlib/devendoring.patch new file mode 100644 index 00000000000000..0aeda85f4ce525 --- /dev/null +++ b/ports/meshlib/devendoring.patch @@ -0,0 +1,124 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a1e9a49..e9751cb 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -210,6 +210,10 @@ ENDIF() + add_subdirectory(${PROJECT_SOURCE_DIR}/MRPch ./MRPch) + add_subdirectory(${PROJECT_SOURCE_DIR}/MRMesh ./MRMesh) + ++IF(MESHLIB_BUILD_EXTRA_IO_FORMATS) ++ add_subdirectory(${PROJECT_SOURCE_DIR}/laz-perf) ++ENDIF() ++ + IF(MESHLIB_BUILD_EXTRA_IO_FORMATS) + add_subdirectory(${PROJECT_SOURCE_DIR}/MRIOExtras ./MRIOExtras) + ENDIF() +@@ -274,8 +278,6 @@ IF(MESHLIB_PYTHON_SUPPORT) + ENDIF() + + IF(MSVC) +- add_subdirectory(${PROJECT_SOURCE_DIR}/laz-perf) +- add_subdirectory(${PROJECT_SOURCE_DIR}/OpenCTM) + ENDIF() + + IF(NOT MR_EMSCRIPTEN) +diff --git a/source/MRIOExtras/CMakeLists.txt b/source/MRIOExtras/CMakeLists.txt +index 4ee8a4e..00c2936 100644 +--- a/source/MRIOExtras/CMakeLists.txt ++++ b/source/MRIOExtras/CMakeLists.txt +@@ -33,7 +33,8 @@ target_link_libraries(${PROJECT_NAME} + ) + + IF(NOT MRIOEXTRAS_NO_XML) +- target_link_libraries(${PROJECT_NAME} PRIVATE tinyxml2) ++ find_package(tinyxml2 CONFIG REQUIRED) ++ target_link_libraries(${PROJECT_NAME} PRIVATE tinyxml2::tinyxml2) + ENDIF() + + IF(NOT MRIOEXTRAS_NO_CTM) +@@ -44,9 +45,10 @@ IF(NOT MRIOEXTRAS_NO_CTM) + ENDIF() + + IF(NOT MRIOEXTRAS_NO_E57) ++ find_package(E57Format CONFIG REQUIRED) + target_link_libraries(${PROJECT_NAME} PRIVATE E57Format) + +- IF(MSVC AND DEFINED VCPKG_INSTALLED_DIR AND DEFINED VCPKG_TARGET_TRIPLET) ++ IF(MSVC AND DEFINED VCPKG_INSTALLED_DIR AND DEFINED VCPKG_TARGET_TRIPLET AND BUILD_SHARED_LIBS) + file(GLOB XERCES_DLL_RELEASE "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/bin/xerces-c_3_*.dll") + file(GLOB XERCES_DLL_DEBUG "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/bin/xerces-c_3_*.dll") + +@@ -72,12 +74,8 @@ IF(NOT MRIOEXTRAS_NO_E57) + ENDIF() + + IF(NOT MRIOEXTRAS_NO_JPEG) +- IF(APPLE) +- target_include_directories(${PROJECT_NAME} PRIVATE $) # @todo +- target_link_libraries(${PROJECT_NAME} PRIVATE ${HOMEBREW_PREFIX}/opt/jpeg-turbo/lib/libturbojpeg.dylib) +- ELSE() +- target_link_libraries(${PROJECT_NAME} PRIVATE turbojpeg) +- ENDIF() ++ find_package(libjpeg-turbo CONFIG REQUIRED) ++ target_link_libraries(${PROJECT_NAME} PRIVATE $,libjpeg-turbo::turbojpeg,libjpeg-turbo::turbojpeg-static>) + ENDIF() + + IF(NOT MRIOEXTRAS_NO_LAS) +diff --git a/source/MRVoxels/CMakeLists.txt b/source/MRVoxels/CMakeLists.txt +index 104edb9..c4f1cf1 100644 +--- a/source/MRVoxels/CMakeLists.txt ++++ b/source/MRVoxels/CMakeLists.txt +@@ -32,8 +32,9 @@ target_link_libraries(${PROJECT_NAME} + OpenVDB::openvdb + ) + # required for static linking +-IF(EMSCRIPTEN) +- target_link_libraries(${PROJECT_NAME} PRIVATE blosc) ++find_package(blosc CONFIG REQUIRED) ++IF(OpenVDB_USES_BLOSC AND TARGET blosc_static) ++ target_link_libraries(${PROJECT_NAME} PRIVATE blosc_static) + ENDIF() + + IF(NOT MRVOXELS_NO_DICOM) +diff --git a/source/laz-perf/CMakeLists.txt b/source/laz-perf/CMakeLists.txt +index d5ccfd4..ec7475f 100644 +--- a/source/laz-perf/CMakeLists.txt ++++ b/source/laz-perf/CMakeLists.txt +@@ -1,7 +1,9 @@ + # This file exists so we can disable some warnings in Lazperf. + # If we were to `add_subdirectory` it directly from `MeshLib/CMakeLists.txt`, we would have to modify the global CXX flags, which is uncool. + +-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4244 /wd4245 /wd4456 /wd4458 /wd5051") ++if(MSVC) ++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4244 /wd4245 /wd4456 /wd4458 /wd5051") ++endif() + set(WITH_TESTS OFF CACHE BOOL "Choose if LAZPERF unit tests should be built") + set(WITH_TOOLS OFF CACHE BOOL "Choose if LAZPERF tools should be built") + add_subdirectory(${MESHLIB_THIRDPARTY_DIR}/laz-perf ./laz-perf) +diff --git a/thirdparty/CMakeLists.txt b/thirdparty/CMakeLists.txt +index e4734cf..e1e89bd 100644 +--- a/thirdparty/CMakeLists.txt ++++ b/thirdparty/CMakeLists.txt +@@ -83,10 +83,8 @@ IF(NOT APPLE AND NOT MR_EMSCRIPTEN) + ENDIF() + ENDIF() + +-add_subdirectory(./OpenCTM-git ./OpenCTM) +- +-option(PHMAP_INSTALL "" ON) +-add_subdirectory(./parallel-hashmap) ++find_path(PARALLEL_HASHMAP_INCLUDE_DIRS "parallel_hashmap/btree.h") ++include_directories(${PARALLEL_HASHMAP_INCLUDE_DIRS}) + + IF(EMSCRIPTEN) + add_subdirectory(./expected ./expected) +@@ -162,8 +160,8 @@ IF(NOT MR_EMSCRIPTEN) + add_subdirectory(./mrbind-pybind11) + ENDIF() + +-set(TINYGLTF_INSTALL ON) +-add_subdirectory(./tinygltf) ++find_path(TINYGLTF_INCLUDE_DIRS "tiny_gltf.h") ++include_directories(${TINYGLTF_INCLUDE_DIRS}) + + set(WITH_TESTS OFF CACHE BOOL "") + set(WITH_EMBIND OFF CACHE BOOL "") diff --git a/ports/meshlib/portfile.cmake b/ports/meshlib/portfile.cmake index 6d8d3b67a44977..13cb4c803e5b9c 100644 --- a/ports/meshlib/portfile.cmake +++ b/ports/meshlib/portfile.cmake @@ -5,19 +5,13 @@ vcpkg_from_github( SHA512 ec4eb605c3fb1dcddc6d2219baa6eb9402bf57b1840d601bcc92b82b9b48a4d8bd8221b2589cc0677eef9185977a0afdde1464d74dccd964c4ff2dc5a1742be9 HEAD_REF master PATCHES - fix-msvc-lazperf-build.patch - fix-linux-openvdb-blosc-link.patch + devendoring.patch fix-cassert.patch - fix-e57format.patch fix-exported-include-dirs.patch - fix-jpeg-link.patch - disable-openctm.patch disable-warning-as-error.patch fix-iosfwd.patch fix-iterator_debug_level.patch - fix-tinyxml2-link.patch fix-install-dirs.patch - devendoring-parallel-hashmap.patch ) vcpkg_from_github( diff --git a/versions/m-/meshlib.json b/versions/m-/meshlib.json index 312fd163ddb985..4a373b35fad2bc 100644 --- a/versions/m-/meshlib.json +++ b/versions/m-/meshlib.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "2e800a8e5345392817380a09f5b44032d3134adb", + "git-tree": "2992c0ee435e73703038d59fda2f66b00b930eca", "version": "3.1.1.92", "port-version": 0 } From 8a8ded991ecaee04f5e902fa773abd9630f6d7c8 Mon Sep 17 00:00:00 2001 From: toge Date: Fri, 13 Mar 2026 20:15:15 +0900 Subject: [PATCH 28/33] devendoring parallel-hashmap --- ports/meshlib/fix-exported-include-dirs.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/meshlib/fix-exported-include-dirs.patch b/ports/meshlib/fix-exported-include-dirs.patch index 39860a10be49bc..80a916a7608680 100644 --- a/ports/meshlib/fix-exported-include-dirs.patch +++ b/ports/meshlib/fix-exported-include-dirs.patch @@ -1,13 +1,13 @@ diff --git a/source/MRMesh/CMakeLists.txt b/source/MRMesh/CMakeLists.txt --- a/source/MRMesh/CMakeLists.txt +++ b/source/MRMesh/CMakeLists.txt -@@ -66,6 +66,8 @@ target_link_libraries(${PROJECT_NAME} PRIVATE libzip::zip) +@@ -66,6 +66,7 @@ target_link_libraries(${PROJECT_NAME} PRIVATE libzip::zip) # TODO: CMake config target_include_directories(${PROJECT_NAME} PUBLIC + $ + $ - $ +- $ ) IF(APPLE) From 0936d5b9adf34319f3147f16c59d38eec695f2fa Mon Sep 17 00:00:00 2001 From: toge Date: Fri, 13 Mar 2026 20:15:33 +0900 Subject: [PATCH 29/33] update versions --- versions/m-/meshlib.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/m-/meshlib.json b/versions/m-/meshlib.json index 4a373b35fad2bc..a9748b732ca6e5 100644 --- a/versions/m-/meshlib.json +++ b/versions/m-/meshlib.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "2992c0ee435e73703038d59fda2f66b00b930eca", + "git-tree": "c45230fef34a110a40393ce5534da6be20fe518b", "version": "3.1.1.92", "port-version": 0 } From 411096d4c97038e3bb0d60df59eca449bc8d7d99 Mon Sep 17 00:00:00 2001 From: toge Date: Mon, 16 Mar 2026 15:18:49 +0900 Subject: [PATCH 30/33] force shared build --- ports/meshlib/portfile.cmake | 8 +++----- versions/m-/meshlib.json | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/ports/meshlib/portfile.cmake b/ports/meshlib/portfile.cmake index 13cb4c803e5b9c..701cfdfddbb534 100644 --- a/ports/meshlib/portfile.cmake +++ b/ports/meshlib/portfile.cmake @@ -29,6 +29,9 @@ file(COPY "${LAZ_PERF_SOURCE_PATH}/" DESTINATION "${SOURCE_PATH}/thirdparty/laz- vcpkg_find_acquire_program(PKGCONFIG) set(ENV{PKG_CONFIG} "${PKGCONFIG}") +# meshlib supports only dynamic linking +set(VCPKG_LIBRARY_LINKAGE dynamic) + vcpkg_cmake_configure( SOURCE_PATH "${SOURCE_PATH}" DISABLE_PARALLEL_CONFIGURE @@ -59,9 +62,4 @@ vcpkg_copy_tools( file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share" "${CURRENT_PACKAGES_DIR}/debug/include" ) -if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL "static") - file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin" - "${CURRENT_PACKAGES_DIR}/bin" - ) -endif() vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") diff --git a/versions/m-/meshlib.json b/versions/m-/meshlib.json index a9748b732ca6e5..0c3ef5f0e148a5 100644 --- a/versions/m-/meshlib.json +++ b/versions/m-/meshlib.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "c45230fef34a110a40393ce5534da6be20fe518b", + "git-tree": "d6b2d1cf33d75ab78de985097c01ca5a9b1bf183", "version": "3.1.1.92", "port-version": 0 } From 726187acb61e779236d5a0f6ca99ea270aa64696 Mon Sep 17 00:00:00 2001 From: toge Date: Mon, 16 Mar 2026 17:31:06 +0900 Subject: [PATCH 31/33] disable copying xerces.dlls --- ports/meshlib/fix-e57format.patch | 8 ++++---- versions/m-/meshlib.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ports/meshlib/fix-e57format.patch b/ports/meshlib/fix-e57format.patch index f75ff96020fbe0..1677715b52b9e0 100644 --- a/ports/meshlib/fix-e57format.patch +++ b/ports/meshlib/fix-e57format.patch @@ -4,13 +4,13 @@ index 4ee8a4e..3d447b7 100644 +++ b/source/MRIOExtras/CMakeLists.txt @@ -44,9 +44,10 @@ IF(NOT MRIOEXTRAS_NO_CTM) ENDIF() - + IF(NOT MRIOEXTRAS_NO_E57) + find_package(E57Format CONFIG REQUIRED) target_link_libraries(${PROJECT_NAME} PRIVATE E57Format) - + - IF(MSVC AND DEFINED VCPKG_INSTALLED_DIR AND DEFINED VCPKG_TARGET_TRIPLET) -+ IF(MSVC AND DEFINED VCPKG_INSTALLED_DIR AND DEFINED VCPKG_TARGET_TRIPLET AND BUILD_SHARED_LIBS) ++ IF(FALSE) file(GLOB XERCES_DLL_RELEASE "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/bin/xerces-c_3_*.dll") file(GLOB XERCES_DLL_DEBUG "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/bin/xerces-c_3_*.dll") - + diff --git a/versions/m-/meshlib.json b/versions/m-/meshlib.json index 0c3ef5f0e148a5..7f92cae4bad972 100644 --- a/versions/m-/meshlib.json +++ b/versions/m-/meshlib.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "d6b2d1cf33d75ab78de985097c01ca5a9b1bf183", + "git-tree": "e7243d968297d392e316ee0c019e5b5897e84df3", "version": "3.1.1.92", "port-version": 0 } From 987e73cd061aea0236eec4452ba8b38e00d95519 Mon Sep 17 00:00:00 2001 From: toge Date: Mon, 16 Mar 2026 18:51:45 +0900 Subject: [PATCH 32/33] disable copying xerces.dlls --- ports/meshlib/devendoring.patch | 34 ++++++++++++++++----------------- versions/m-/meshlib.json | 2 +- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/ports/meshlib/devendoring.patch b/ports/meshlib/devendoring.patch index 0aeda85f4ce525..7101092028b391 100644 --- a/ports/meshlib/devendoring.patch +++ b/ports/meshlib/devendoring.patch @@ -5,7 +5,7 @@ index a1e9a49..e9751cb 100644 @@ -210,6 +210,10 @@ ENDIF() add_subdirectory(${PROJECT_SOURCE_DIR}/MRPch ./MRPch) add_subdirectory(${PROJECT_SOURCE_DIR}/MRMesh ./MRMesh) - + +IF(MESHLIB_BUILD_EXTRA_IO_FORMATS) + add_subdirectory(${PROJECT_SOURCE_DIR}/laz-perf) +ENDIF() @@ -15,12 +15,12 @@ index a1e9a49..e9751cb 100644 ENDIF() @@ -274,8 +278,6 @@ IF(MESHLIB_PYTHON_SUPPORT) ENDIF() - + IF(MSVC) - add_subdirectory(${PROJECT_SOURCE_DIR}/laz-perf) - add_subdirectory(${PROJECT_SOURCE_DIR}/OpenCTM) ENDIF() - + IF(NOT MR_EMSCRIPTEN) diff --git a/source/MRIOExtras/CMakeLists.txt b/source/MRIOExtras/CMakeLists.txt index 4ee8a4e..00c2936 100644 @@ -28,29 +28,29 @@ index 4ee8a4e..00c2936 100644 +++ b/source/MRIOExtras/CMakeLists.txt @@ -33,7 +33,8 @@ target_link_libraries(${PROJECT_NAME} ) - + IF(NOT MRIOEXTRAS_NO_XML) - target_link_libraries(${PROJECT_NAME} PRIVATE tinyxml2) + find_package(tinyxml2 CONFIG REQUIRED) + target_link_libraries(${PROJECT_NAME} PRIVATE tinyxml2::tinyxml2) ENDIF() - + IF(NOT MRIOEXTRAS_NO_CTM) @@ -44,9 +45,10 @@ IF(NOT MRIOEXTRAS_NO_CTM) ENDIF() - + IF(NOT MRIOEXTRAS_NO_E57) + find_package(E57Format CONFIG REQUIRED) target_link_libraries(${PROJECT_NAME} PRIVATE E57Format) - + - IF(MSVC AND DEFINED VCPKG_INSTALLED_DIR AND DEFINED VCPKG_TARGET_TRIPLET) -+ IF(MSVC AND DEFINED VCPKG_INSTALLED_DIR AND DEFINED VCPKG_TARGET_TRIPLET AND BUILD_SHARED_LIBS) ++ IF(FALSE) file(GLOB XERCES_DLL_RELEASE "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/bin/xerces-c_3_*.dll") file(GLOB XERCES_DLL_DEBUG "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/bin/xerces-c_3_*.dll") - + @@ -72,12 +74,8 @@ IF(NOT MRIOEXTRAS_NO_E57) ENDIF() - + IF(NOT MRIOEXTRAS_NO_JPEG) - IF(APPLE) - target_include_directories(${PROJECT_NAME} PRIVATE $) # @todo @@ -61,7 +61,7 @@ index 4ee8a4e..00c2936 100644 + find_package(libjpeg-turbo CONFIG REQUIRED) + target_link_libraries(${PROJECT_NAME} PRIVATE $,libjpeg-turbo::turbojpeg,libjpeg-turbo::turbojpeg-static>) ENDIF() - + IF(NOT MRIOEXTRAS_NO_LAS) diff --git a/source/MRVoxels/CMakeLists.txt b/source/MRVoxels/CMakeLists.txt index 104edb9..c4f1cf1 100644 @@ -77,7 +77,7 @@ index 104edb9..c4f1cf1 100644 +IF(OpenVDB_USES_BLOSC AND TARGET blosc_static) + target_link_libraries(${PROJECT_NAME} PRIVATE blosc_static) ENDIF() - + IF(NOT MRVOXELS_NO_DICOM) diff --git a/source/laz-perf/CMakeLists.txt b/source/laz-perf/CMakeLists.txt index d5ccfd4..ec7475f 100644 @@ -86,7 +86,7 @@ index d5ccfd4..ec7475f 100644 @@ -1,7 +1,9 @@ # This file exists so we can disable some warnings in Lazperf. # If we were to `add_subdirectory` it directly from `MeshLib/CMakeLists.txt`, we would have to modify the global CXX flags, which is uncool. - + -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4244 /wd4245 /wd4456 /wd4458 /wd5051") +if(MSVC) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4244 /wd4245 /wd4456 /wd4458 /wd5051") @@ -101,24 +101,24 @@ index e4734cf..e1e89bd 100644 @@ -83,10 +83,8 @@ IF(NOT APPLE AND NOT MR_EMSCRIPTEN) ENDIF() ENDIF() - + -add_subdirectory(./OpenCTM-git ./OpenCTM) - -option(PHMAP_INSTALL "" ON) -add_subdirectory(./parallel-hashmap) +find_path(PARALLEL_HASHMAP_INCLUDE_DIRS "parallel_hashmap/btree.h") +include_directories(${PARALLEL_HASHMAP_INCLUDE_DIRS}) - + IF(EMSCRIPTEN) add_subdirectory(./expected ./expected) @@ -162,8 +160,8 @@ IF(NOT MR_EMSCRIPTEN) add_subdirectory(./mrbind-pybind11) ENDIF() - + -set(TINYGLTF_INSTALL ON) -add_subdirectory(./tinygltf) +find_path(TINYGLTF_INCLUDE_DIRS "tiny_gltf.h") +include_directories(${TINYGLTF_INCLUDE_DIRS}) - + set(WITH_TESTS OFF CACHE BOOL "") set(WITH_EMBIND OFF CACHE BOOL "") diff --git a/versions/m-/meshlib.json b/versions/m-/meshlib.json index 7f92cae4bad972..f0d4fc88c7610d 100644 --- a/versions/m-/meshlib.json +++ b/versions/m-/meshlib.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "e7243d968297d392e316ee0c019e5b5897e84df3", + "git-tree": "2828ce0ae931386581ae849c286e0ed2eb1a2a8a", "version": "3.1.1.92", "port-version": 0 } From 4a947f3d1ff65490643685a5a6b776b7223ca1b0 Mon Sep 17 00:00:00 2001 From: toge Date: Mon, 16 Mar 2026 22:39:50 +0900 Subject: [PATCH 33/33] remove unused patches --- .../devendoring-parallel-hashmap.patch | 40 ------------------- ports/meshlib/disable-openctm.patch | 24 ----------- ports/meshlib/fix-e57format.patch | 16 -------- ports/meshlib/fix-jpeg-link.patch | 19 --------- .../fix-linux-openvdb-blosc-link.patch | 17 -------- ports/meshlib/fix-msvc-lazperf-build.patch | 37 ----------------- ports/meshlib/fix-tinyxml2-link.patch | 14 ------- versions/m-/meshlib.json | 2 +- 8 files changed, 1 insertion(+), 168 deletions(-) delete mode 100644 ports/meshlib/devendoring-parallel-hashmap.patch delete mode 100644 ports/meshlib/disable-openctm.patch delete mode 100644 ports/meshlib/fix-e57format.patch delete mode 100644 ports/meshlib/fix-jpeg-link.patch delete mode 100644 ports/meshlib/fix-linux-openvdb-blosc-link.patch delete mode 100644 ports/meshlib/fix-msvc-lazperf-build.patch delete mode 100644 ports/meshlib/fix-tinyxml2-link.patch diff --git a/ports/meshlib/devendoring-parallel-hashmap.patch b/ports/meshlib/devendoring-parallel-hashmap.patch deleted file mode 100644 index 549964056b6884..00000000000000 --- a/ports/meshlib/devendoring-parallel-hashmap.patch +++ /dev/null @@ -1,40 +0,0 @@ -diff --git a/source/MRMesh/CMakeLists.txt b/source/MRMesh/CMakeLists.txt -index 8d2464f..9169b52 100644 ---- a/source/MRMesh/CMakeLists.txt -+++ b/source/MRMesh/CMakeLists.txt -@@ -69,7 +69,7 @@ target_include_directories(${PROJECT_NAME} - PUBLIC - $ - $ -- $ -+ $ - ) - - IF(APPLE) -diff --git a/thirdparty/CMakeLists.txt b/thirdparty/CMakeLists.txt -index 4aca508..e1e89bd 100644 ---- a/thirdparty/CMakeLists.txt -+++ b/thirdparty/CMakeLists.txt -@@ -83,9 +83,8 @@ IF(NOT APPLE AND NOT MR_EMSCRIPTEN) - ENDIF() - ENDIF() - -- --option(PHMAP_INSTALL "" ON) --add_subdirectory(./parallel-hashmap) -+find_path(PARALLEL_HASHMAP_INCLUDE_DIRS "parallel_hashmap/btree.h") -+include_directories(${PARALLEL_HASHMAP_INCLUDE_DIRS}) - - IF(EMSCRIPTEN) - add_subdirectory(./expected ./expected) -@@ -161,8 +160,8 @@ IF(NOT MR_EMSCRIPTEN) - add_subdirectory(./mrbind-pybind11) - ENDIF() - --set(TINYGLTF_INSTALL ON) --add_subdirectory(./tinygltf) -+find_path(TINYGLTF_INCLUDE_DIRS "tiny_gltf.h") -+include_directories(${TINYGLTF_INCLUDE_DIRS}) - - set(WITH_TESTS OFF CACHE BOOL "") - set(WITH_EMBIND OFF CACHE BOOL "") diff --git a/ports/meshlib/disable-openctm.patch b/ports/meshlib/disable-openctm.patch deleted file mode 100644 index a2cec5d128a54f..00000000000000 --- a/ports/meshlib/disable-openctm.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index ed97ca0..e9751cb 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -278,7 +278,6 @@ IF(MESHLIB_PYTHON_SUPPORT) - ENDIF() - - IF(MSVC) -- add_subdirectory(${PROJECT_SOURCE_DIR}/OpenCTM) - ENDIF() - - IF(NOT MR_EMSCRIPTEN) -diff --git a/thirdparty/CMakeLists.txt b/thirdparty/CMakeLists.txt -index e4734cf..4aca508 100644 ---- a/thirdparty/CMakeLists.txt -+++ b/thirdparty/CMakeLists.txt -@@ -83,7 +83,6 @@ IF(NOT APPLE AND NOT MR_EMSCRIPTEN) - ENDIF() - ENDIF() - --add_subdirectory(./OpenCTM-git ./OpenCTM) - - option(PHMAP_INSTALL "" ON) - add_subdirectory(./parallel-hashmap) diff --git a/ports/meshlib/fix-e57format.patch b/ports/meshlib/fix-e57format.patch deleted file mode 100644 index 1677715b52b9e0..00000000000000 --- a/ports/meshlib/fix-e57format.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git a/source/MRIOExtras/CMakeLists.txt b/source/MRIOExtras/CMakeLists.txt -index 4ee8a4e..3d447b7 100644 ---- a/source/MRIOExtras/CMakeLists.txt -+++ b/source/MRIOExtras/CMakeLists.txt -@@ -44,9 +44,10 @@ IF(NOT MRIOEXTRAS_NO_CTM) - ENDIF() - - IF(NOT MRIOEXTRAS_NO_E57) -+ find_package(E57Format CONFIG REQUIRED) - target_link_libraries(${PROJECT_NAME} PRIVATE E57Format) - -- IF(MSVC AND DEFINED VCPKG_INSTALLED_DIR AND DEFINED VCPKG_TARGET_TRIPLET) -+ IF(FALSE) - file(GLOB XERCES_DLL_RELEASE "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/bin/xerces-c_3_*.dll") - file(GLOB XERCES_DLL_DEBUG "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/bin/xerces-c_3_*.dll") - diff --git a/ports/meshlib/fix-jpeg-link.patch b/ports/meshlib/fix-jpeg-link.patch deleted file mode 100644 index 22ea36e70e9df0..00000000000000 --- a/ports/meshlib/fix-jpeg-link.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff --git a/source/MRIOExtras/CMakeLists.txt b/source/MRIOExtras/CMakeLists.txt -index 5079163..81f7742 100644 ---- a/source/MRIOExtras/CMakeLists.txt -+++ b/source/MRIOExtras/CMakeLists.txt -@@ -79,12 +79,8 @@ IF(NOT MRIOEXTRAS_NO_E57) - ENDIF() - - IF(NOT MRIOEXTRAS_NO_JPEG) -- IF(APPLE) -- target_include_directories(${PROJECT_NAME} PRIVATE $) # @todo -- target_link_libraries(${PROJECT_NAME} PRIVATE ${HOMEBREW_PREFIX}/opt/jpeg-turbo/lib/libturbojpeg.dylib) -- ELSE() -- target_link_libraries(${PROJECT_NAME} PRIVATE turbojpeg) -- ENDIF() -+ find_package(libjpeg-turbo CONFIG REQUIRED) -+ target_link_libraries(${PROJECT_NAME} PRIVATE $,libjpeg-turbo::turbojpeg,libjpeg-turbo::turbojpeg-static>) - ENDIF() - - IF(NOT MRIOEXTRAS_NO_LAS) diff --git a/ports/meshlib/fix-linux-openvdb-blosc-link.patch b/ports/meshlib/fix-linux-openvdb-blosc-link.patch deleted file mode 100644 index 9f1c6fbaed66f8..00000000000000 --- a/ports/meshlib/fix-linux-openvdb-blosc-link.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/source/MRVoxels/CMakeLists.txt b/source/MRVoxels/CMakeLists.txt -index 8b4df1f..d302e41 100644 ---- a/source/MRVoxels/CMakeLists.txt -+++ b/source/MRVoxels/CMakeLists.txt -@@ -32,9 +32,10 @@ target_link_libraries(${PROJECT_NAME} - OpenVDB::openvdb - ) - # required for static linking --IF(EMSCRIPTEN) -- target_link_libraries(${PROJECT_NAME} PRIVATE blosc) -+find_package(blosc CONFIG REQUIRED) -+IF(OpenVDB_USES_BLOSC AND TARGET blosc_static) -+ target_link_libraries(${PROJECT_NAME} PRIVATE blosc_static) - ENDIF() - - IF(NOT MRVOXELS_NO_DICOM) - find_package(GDCM CONFIG REQUIRED) diff --git a/ports/meshlib/fix-msvc-lazperf-build.patch b/ports/meshlib/fix-msvc-lazperf-build.patch deleted file mode 100644 index dbd8296d5f378c..00000000000000 --- a/ports/meshlib/fix-msvc-lazperf-build.patch +++ /dev/null @@ -1,37 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index ea44ef0..8600c40 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -208,6 +208,10 @@ ENDIF() - # MRMesh library is always built - add_subdirectory(${PROJECT_SOURCE_DIR}/MRPch ./MRPch) - add_subdirectory(${PROJECT_SOURCE_DIR}/MRMesh ./MRMesh) -+ -+IF(MESHLIB_BUILD_EXTRA_IO_FORMATS) -+ add_subdirectory(${PROJECT_SOURCE_DIR}/laz-perf) -+ENDIF() - - IF(MESHLIB_BUILD_EXTRA_IO_FORMATS) - add_subdirectory(${PROJECT_SOURCE_DIR}/MRIOExtras ./MRIOExtras) -@@ -274,6 +278,5 @@ IF(MESHLIB_PYTHON_SUPPORT) - ENDIF() - - IF(MSVC) -- add_subdirectory(${PROJECT_SOURCE_DIR}/laz-perf) - add_subdirectory(${PROJECT_SOURCE_DIR}/OpenCTM) - ENDIF() -diff --git a/source/laz-perf/CMakeLists.txt b/source/laz-perf/CMakeLists.txt -index 3cb0485..7a4a398 100644 ---- a/source/laz-perf/CMakeLists.txt -+++ b/source/laz-perf/CMakeLists.txt -@@ -1,7 +1,9 @@ - # This file exists so we can disable some warnings in Lazperf. - # If we were to `add_subdirectory` it directly from `MeshLib/CMakeLists.txt`, we would have to modify the global CXX flags, which is uncool. - --set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4244 /wd4245 /wd4456 /wd4458 /wd5051") -+if(MSVC) -+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4244 /wd4245 /wd4456 /wd4458 /wd5051") -+endif() - set(WITH_TESTS OFF CACHE BOOL "Choose if LAZPERF unit tests should be built") - set(WITH_TOOLS OFF CACHE BOOL "Choose if LAZPERF tools should be built") - add_subdirectory(${MESHLIB_THIRDPARTY_DIR}/laz-perf ./laz-perf) diff --git a/ports/meshlib/fix-tinyxml2-link.patch b/ports/meshlib/fix-tinyxml2-link.patch deleted file mode 100644 index f6470fc08f0d61..00000000000000 --- a/ports/meshlib/fix-tinyxml2-link.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/source/MRIOExtras/CMakeLists.txt b/source/MRIOExtras/CMakeLists.txt -index 7808659..0a03903 100644 ---- a/source/MRIOExtras/CMakeLists.txt -+++ b/source/MRIOExtras/CMakeLists.txt -@@ -39,7 +39,8 @@ target_link_libraries(${PROJECT_NAME} - ) - - IF(NOT MRIOEXTRAS_NO_XML) -- target_link_libraries(${PROJECT_NAME} PRIVATE tinyxml2) -+ find_package(tinyxml2 CONFIG REQUIRED) -+ target_link_libraries(${PROJECT_NAME} PRIVATE tinyxml2::tinyxml2) - ENDIF() - - IF(NOT MRIOEXTRAS_NO_CTM) diff --git a/versions/m-/meshlib.json b/versions/m-/meshlib.json index f0d4fc88c7610d..5842445b97e289 100644 --- a/versions/m-/meshlib.json +++ b/versions/m-/meshlib.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "2828ce0ae931386581ae849c286e0ed2eb1a2a8a", + "git-tree": "1d3bcb845aa10232bd2a6db7efaac22a4b261dbf", "version": "3.1.1.92", "port-version": 0 }