From 9238bc421eb3c9078d0d2aa787de346c7207190c Mon Sep 17 00:00:00 2001 From: Miro HronĨok Date: Aug 30 2021 19:11:05 +0000 Subject: Fix for PCL 1.12 --- diff --git a/cloudcompare-pcl1.12.patch b/cloudcompare-pcl1.12.patch new file mode 100644 index 0000000..b2c22a6 --- /dev/null +++ b/cloudcompare-pcl1.12.patch @@ -0,0 +1,42 @@ +diff --git a/plugins/qPCL/PclUtils/filters/MLSSmoothingUpsampling.cpp b/plugins/qPCL/PclUtils/filters/MLSSmoothingUpsampling.cpp +index f664030..5668554 100644 +--- a/plugins/qPCL/PclUtils/filters/MLSSmoothingUpsampling.cpp ++++ b/plugins/qPCL/PclUtils/filters/MLSSmoothingUpsampling.cpp +@@ -24,6 +24,7 @@ + #include "../utils/sm2cc.h" + + //PCL ++#include + #include + #include + +@@ -54,7 +55,7 @@ int smooth_mls(const typename pcl::PointCloud::Ptr &incloud, + + #ifdef _OPENMP + //create the smoothing object +- pcl::MovingLeastSquaresOMP< PointInT, PointOutT > smoother; ++ pcl::MovingLeastSquares< PointInT, PointOutT > smoother; + int n_threads = omp_get_max_threads(); + smoother.setNumberOfThreads(n_threads); + #else +@@ -64,7 +65,6 @@ int smooth_mls(const typename pcl::PointCloud::Ptr &incloud, + smoother.setSearchMethod(tree); + smoother.setSearchRadius(params.search_radius_); + smoother.setComputeNormals(params.compute_normals_); +- smoother.setPolynomialFit(params.polynomial_fit_); + + if (params.polynomial_fit_) + { +diff --git a/plugins/qPCL/PclUtils/utils/PCLConv.h b/plugins/qPCL/PclUtils/utils/PCLConv.h +index 1a480aa..d5706de 100644 +--- a/plugins/qPCL/PclUtils/utils/PCLConv.h ++++ b/plugins/qPCL/PclUtils/utils/PCLConv.h +@@ -27,7 +27,7 @@ + + #else //Version 1.7 or newer + +-#include ++#include + #define FROM_PCL_CLOUD pcl::fromPCLPointCloud2 + #define TO_PCL_CLOUD pcl::toPCLPointCloud2 + diff --git a/cloudcompare.spec b/cloudcompare.spec index 0740e37..5a5842d 100644 --- a/cloudcompare.spec +++ b/cloudcompare.spec @@ -57,6 +57,11 @@ Patch2: %{name}-pcl.patch # https://github.com/CloudCompare/CloudCompare/pull/1310 Patch3: %{name}-pcl1.11.patch +# https://github.com/CloudCompare/CloudCompare/commit/5bc453a08a +# https://github.com/CloudCompare/CloudCompare/commit/cd578da678 +# https://github.com/CloudCompare/CloudCompare/issues/1504 +Patch4: %{name}-pcl1.12.patch + BuildRequires: boost-devel BuildRequires: desktop-file-utils BuildRequires: cmake >= 3