diff options
| author | Maxime Gimeno <maxime.gimeno@gmail.com> | 2019-10-21 15:26:33 +0200 |
|---|---|---|
| committer | Maxime Gimeno <maxime.gimeno@gmail.com> | 2019-10-21 15:26:33 +0200 |
| commit | 77c50e27ebb3c4c98d7610a9cd9b29293eb85d0c (patch) | |
| tree | 349fae3945f0e5e9c69869f709aa1da02401b836 | |
| parent | 042011d52ffd9da60e9d2954942b8fe42d5288f9 (diff) | |
| download | vcpkg-77c50e27ebb3c4c98d7610a9cd9b29293eb85d0c.tar.gz vcpkg-77c50e27ebb3c4c98d7610a9cd9b29293eb85d0c.zip | |
Add a patch for openmvs
| -rwxr-xr-x | ports/openmvs/cgal-5.0.patch | 40 | ||||
| -rw-r--r-- | ports/openmvs/portfile.cmake | 1 |
2 files changed, 41 insertions, 0 deletions
diff --git a/ports/openmvs/cgal-5.0.patch b/ports/openmvs/cgal-5.0.patch new file mode 100755 index 000000000..042bf9dab --- /dev/null +++ b/ports/openmvs/cgal-5.0.patch @@ -0,0 +1,40 @@ +diff --git a/libs/MVS/DepthMap.cpp b/libs/MVS/DepthMap.cpp +index 12973ac..f6621f0 100644 +--- a/libs/MVS/DepthMap.cpp ++++ b/libs/MVS/DepthMap.cpp +@@ -1071,16 +1071,25 @@ void MVS::EstimatePointNormals(const ImageArr& images, PointCloud& pointcloud, i + // estimates normals direction; + // Note: pca_estimate_normals() requires an iterator over points + // as well as property maps to access each point's position and normal. +- #if CGAL_VERSION_NR < 1040800000 +- CGAL::pca_estimate_normals( +- #else +- CGAL::pca_estimate_normals<CGAL::Sequential_tag>( +- #endif +- pointvectors.begin(), pointvectors.end(), +- CGAL::First_of_pair_property_map<PointVectorPair>(), +- CGAL::Second_of_pair_property_map<PointVectorPair>(), +- numNeighbors +- ); ++ #if CGAL_VERSION_NR < 1041301000 ++ #if CGAL_VERSION_NR < 1040800000 ++ CGAL::pca_estimate_normals( ++ #else ++ CGAL::pca_estimate_normals<CGAL::Sequential_tag>( ++ #endif ++ pointvectors.begin(), pointvectors.end(), ++ CGAL::First_of_pair_property_map<PointVectorPair>(), ++ CGAL::Second_of_pair_property_map<PointVectorPair>(), ++ numNeighbors ++ ); ++ #else ++ CGAL::pca_estimate_normals<CGAL::Sequential_tag>( ++ pointvectors, ++ numNeighbors, ++ CGAL::parameters::point_map(CGAL::First_of_pair_property_map<PointVectorPair>()) ++ .normal_map(CGAL::Second_of_pair_property_map<PointVectorPair>()) ++ ); ++ #endif + // store the point normals + pointcloud.normals.Resize(pointcloud.points.GetSize()); + FOREACH(i, pointcloud.normals) { diff --git a/ports/openmvs/portfile.cmake b/ports/openmvs/portfile.cmake index 6eb30f6f8..eceb605b5 100644 --- a/ports/openmvs/portfile.cmake +++ b/ports/openmvs/portfile.cmake @@ -11,6 +11,7 @@ vcpkg_from_github( PATCHES glfw3_target_compat.patch boost-1.71.patch + cgal-5.0.patch ) vcpkg_configure_cmake( |
