early-access version 2853

This commit is contained in:
pineappleEA
2022-07-23 03:01:36 +02:00
parent 1f2b5081b5
commit 1f111bb69c
8955 changed files with 418777 additions and 999 deletions

View File

@@ -0,0 +1,20 @@
diff --git a/surface/src/3rdparty/opennurbs/opennurbs_lookup.cpp b/surface/src/3rdparty/opennurbs/opennurbs_lookup.cpp
index 49e52b4..a9578bd 100644
--- a/surface/src/3rdparty/opennurbs/opennurbs_lookup.cpp
+++ b/surface/src/3rdparty/opennurbs/opennurbs_lookup.cpp
@@ -666,6 +666,7 @@ std::size_t ON_SerialNumberMap::ActiveIdCount() const
return m_active_id_count;
}
+#pragma optimize("", off)
struct ON_SerialNumberMap::SN_ELEMENT* ON_SerialNumberMap::FirstElement() const
{
struct SN_ELEMENT* e=0;
@@ -717,6 +718,7 @@ struct ON_SerialNumberMap::SN_ELEMENT* ON_SerialNumberMap::FirstElement() const
}
return e;
}
+#pragma optimize("", on)
struct ON_SerialNumberMap::SN_ELEMENT* ON_SerialNumberMap::LastElement() const
{

View File

@@ -0,0 +1,27 @@
From 116e665df611242ea0575a62478c31ec03e78fcc Mon Sep 17 00:00:00 2001
From: raahilsha-z <raahil.sha@zimaging.io>
Date: Wed, 7 Jul 2021 15:53:49 -0400
Subject: [PATCH] add gcc version check
---
CMakeLists.txt | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 63b38df68..29f79d31b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -311,6 +311,10 @@ if(NOT (${FLANN_LIBRARY_TYPE} MATCHES ${PCL_FLANN_REQUIRED_TYPE}) AND NOT (${PCL
message(FATAL_ERROR "Flann was selected with ${PCL_FLANN_REQUIRED_TYPE} but found as ${FLANN_LIBRARY_TYPE}")
endif()
+if(UNIX AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6.0)
+ set (CMAKE_CXX_STANDARD 17)
+endif()
+
# libusb
option(WITH_LIBUSB "Build USB RGBD-Camera drivers" TRUE)
if(WITH_LIBUSB)
--
2.32.0.windows.1

25
externals/vcpkg/ports/pcl/fix-check-sse.patch vendored Executable file
View File

@@ -0,0 +1,25 @@
From c65e034afb538932f4ff55a93332f875ae43a578 Mon Sep 17 00:00:00 2001
From: raahilsha-z <raahil.sha@zimaging.io>
Date: Wed, 7 Jul 2021 15:54:33 -0400
Subject: [PATCH] fix check sse
---
CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 29f79d31b..a1d9bb58f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -86,7 +86,7 @@ endif()
# check for SSE flags
include("${PCL_SOURCE_DIR}/cmake/pcl_find_sse.cmake")
-if(PCL_ENABLE_SSE AND "${CMAKE_CXX_FLAGS}" STREQUAL "${CMAKE_CXX_FLAGS_DEFAULT}")
+if(PCL_ENABLE_SSE)
PCL_CHECK_FOR_SSE()
endif()
--
2.32.0.windows.1

View File

@@ -0,0 +1,20 @@
diff --git a/cmake/pcl_options.cmake b/cmake/pcl_options.cmake
index 6570d75..1d9b0d8 100644
--- a/cmake/pcl_options.cmake
+++ b/cmake/pcl_options.cmake
@@ -7,14 +7,13 @@ if(PCL_SHARED_LIBS)
set(PCL_LIB_SUFFIX ${CMAKE_SHARED_LIBRARY_SUFFIX})
set(PCL_LIB_TYPE "SHARED")
# set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_SHARED_LIBRARY_SUFFIX})
- if(WIN32)
+ if(0)
set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_IMPORT_LIBRARY_SUFFIX})
endif()
else()
set(PCL_LIB_PREFIX ${CMAKE_STATIC_LIBRARY_PREFIX})
set(PCL_LIB_SUFFIX ${CMAKE_STATIC_LIBRARY_SUFFIX})
set(PCL_LIB_TYPE "STATIC")
- set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_STATIC_LIBRARY_SUFFIX})
endif()
mark_as_advanced(PCL_SHARED_LIBS)

View File

@@ -0,0 +1,20 @@
diff --git a/common/src/fft/kiss_fft.c b/common/src/fft/kiss_fft.c
index a996887..37232bd 100644
--- a/common/src/fft/kiss_fft.c
+++ b/common/src/fft/kiss_fft.c
@@ -260,11 +260,13 @@ void kf_work(
#if (defined _OPENMP && (_OPENMP <= 201307)) || (defined __GNUC__ && (__GNUC__ >= 6 && __GNUC__ < 9))
#pragma omp parallel for \
default(none) \
- shared(f, factors, Fout, in_stride)
+ shared(f, factors, Fout, in_stride) \
+ private(k)
#else
#pragma omp parallel for \
default(none) \
- shared(f, factors, Fout, fstride, in_stride, m, p, st)
+ shared(f, factors, Fout, fstride, in_stride, m, p, st) \
+ private(k)
#endif
for (k=0;k<p;++k)
kf_work( Fout +k*m, f+ fstride*in_stride*k,fstride*p,in_stride,factors,st);

View File

@@ -0,0 +1,56 @@
diff --git a/cmake/Modules/FindOpenNI.cmake b/cmake/Modules/FindOpenNI.cmake
index 249e896..eff0b95 100644
--- a/cmake/Modules/FindOpenNI.cmake
+++ b/cmake/Modules/FindOpenNI.cmake
@@ -51,9 +51,9 @@ if(OPENNI_INCLUDE_DIR AND OPENNI_LIBRARY)
mark_as_advanced(OPENNI_INCLUDE_DIRS)
# Libraries
- if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
- find_package(libusb REQUIRED)
- set(OPENNI_LIBRARIES ${OPENNI_LIBRARY} libusb::libusb)
+ if(NOT WIN32)
+ find_package(libusb CONFIG REQUIRED)
+ set(OPENNI_LIBRARIES ${OPENNI_LIBRARIES} ${LIBUSB_LIBRARIES})
else()
set(OPENNI_LIBRARIES ${OPENNI_LIBRARY})
endif()
diff --git a/cmake/Modules/FindOpenNI2.cmake b/cmake/Modules/FindOpenNI2.cmake
index 14ca206..8471067 100644
--- a/cmake/Modules/FindOpenNI2.cmake
+++ b/cmake/Modules/FindOpenNI2.cmake
@@ -41,9 +41,9 @@ if(OPENNI2_INCLUDE_DIR AND OPENNI2_LIBRARY)
mark_as_advanced(OPENNI2_INCLUDE_DIRS)
# Libraries
- if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
- find_package(libusb REQUIRED)
- set(OPENNI2_LIBRARIES ${OPENNI2_LIBRARY} libusb::libusb)
+ if(NOT WIN32)
+ find_package(libusb CONFIG REQUIRED)
+ set(OPENNI2_LIBRARIES ${OPENNI2_LIBRARY} ${LIBUSB_LIBRARIES})
else()
set(OPENNI2_LIBRARIES ${OPENNI2_LIBRARY})
endif()
diff --git a/io/CMakeLists.txt b/io/CMakeLists.txt
index ab91842..189063c 100644
--- a/io/CMakeLists.txt
+++ b/io/CMakeLists.txt
@@ -334,7 +334,7 @@ set(LIB_NAME "pcl_${SUBSYS_NAME}")
add_definitions(${VTK_DEFINES})
-PCL_ADD_LIBRARY(${LIB_NAME} COMPONENT ${SUBSYS_NAME} SOURCES ${srcs} ${incs} ${compression_incs} ${impl_incs} ${OPENNI_INCLUDES} ${OPENNI2_INCLUDES})
+PCL_ADD_LIBRARY(${LIB_NAME} COMPONENT ${SUBSYS_NAME} SOURCES ${srcs} ${incs} ${compression_incs} ${impl_incs} ${OPENNI_INCLUDES} ${OPENNI2_INCLUDES} ${LIBUSB_INCLUDE_DIRS})
target_include_directories(${LIB_NAME} PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include")
@@ -356,7 +356,7 @@ if(PNG_FOUND)
endif()
if(LIBUSB_FOUND)
- target_link_libraries("${LIB_NAME}" libusb::libusb)
+ target_link_libraries("${LIB_NAME}" ${LIBUSB_LIBRARIES})
endif()
if(WITH_OPENNI2)

View File

@@ -0,0 +1,44 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a1d9bb5..73b1465 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -359,10 +359,8 @@ if(WITH_QHULL)
if(NOT PCL_SHARED_LIBS OR ((WIN32 AND NOT MINGW) AND NOT PCL_BUILD_WITH_QHULL_DYNAMIC_LINKING_WIN32))
set(QHULL_USE_STATIC ON)
endif()
- find_package(Qhull)
- if(QHULL_FOUND)
- include_directories(SYSTEM ${QHULL_INCLUDE_DIRS})
- endif()
+ find_package(Qhull CONFIG REQUIRED)
+ set(HAVE_QHULL ON)
endif()
# Cuda
diff --git a/surface/CMakeLists.txt b/surface/CMakeLists.txt
index d8a8566..1953c55 100644
--- a/surface/CMakeLists.txt
+++ b/surface/CMakeLists.txt
@@ -12,7 +12,7 @@ if(NOT build)
return()
endif()
-if(QHULL_FOUND)
+if(Qhull_FOUND)
set(HULL_INCLUDES
"include/pcl/${SUBSYS_NAME}/concave_hull.h"
"include/pcl/${SUBSYS_NAME}/convex_hull.h"
@@ -186,7 +186,12 @@ if(VTK_FOUND)
endif()
endif()
-if(QHULL_FOUND)
+if(Qhull_FOUND)
+ if(QHULL_USE_STATIC)
+ set(QHULL_LIBRARIES Qhull::qhullcpp Qhull::qhullstatic Qhull::qhullstatic_r)
+ else()
+ set(QHULL_LIBRARIES Qhull::qhull_r Qhull::qhullcpp)
+ endif()
target_link_libraries("${LIB_NAME}" ${QHULL_LIBRARIES})
endif()

View File

@@ -0,0 +1,130 @@
diff --git a/gpu/features/src/centroid.cu b/gpu/features/src/centroid.cu
index 045fe6f..3e9ef8b 100644
--- a/gpu/features/src/centroid.cu
+++ b/gpu/features/src/centroid.cu
@@ -44,7 +44,6 @@
#include "pcl/gpu/utils/device/vector_math.hpp"
-using namespace thrust;
namespace pcl
{
@@ -124,9 +123,10 @@ float3 pcl::device::getMaxDistance(const DeviceArray<PointT>& cloud, const float
thrust::counting_iterator<int> ce = cf + cloud.size();
thrust::tuple<float, int> init(0.f, 0);
- thrust::maximum< tuple<float, int> > op;
+ thrust::maximum<thrust::tuple<float, int>> op;
- tuple<float, int> res = transform_reduce(
+ thrust::tuple<float, int> res =
+ transform_reduce(
make_zip_iterator(make_tuple( src_beg, cf )),
make_zip_iterator(make_tuple( src_beg, ce )),
TupleDistCvt(pivot), init, op);
@@ -151,9 +151,9 @@ float3 pcl::device::getMaxDistance(const DeviceArray<PointT>& cloud, const Indic
thrust::counting_iterator<int> ce = cf + indices.size();
thrust::tuple<float, int> init(0.f, 0);
- thrust::maximum< tuple<float, int> > op;
+ thrust::maximum<thrust::tuple<float, int>> op;
- tuple<float, int> res = transform_reduce(
+ thrust::tuple<float, int> res = transform_reduce(
make_zip_iterator(make_tuple( make_permutation_iterator(src_beg, map_beg), cf )),
make_zip_iterator(make_tuple( make_permutation_iterator(src_beg, map_end), ce )),
TupleDistCvt(pivot), init, op);
diff --git a/gpu/octree/src/cuda/bfrs.cu b/gpu/octree/src/cuda/bfrs.cu
index d392f67..0635e1e 100644
--- a/gpu/octree/src/cuda/bfrs.cu
+++ b/gpu/octree/src/cuda/bfrs.cu
@@ -43,7 +43,6 @@
#include "cuda.h"
-using namespace thrust;
namespace pcl
{
@@ -80,11 +79,11 @@ void pcl::device::bruteForceRadiusSearch(const OctreeImpl::PointCloud& cloud, co
InSphere cond(query.x, query.y, query.z, radius);
- device_ptr<const PointType> cloud_ptr((const PointType*)cloud.ptr());
- device_ptr<int> res_ptr(buffer.ptr());
+ thrust::device_ptr<const PointType> cloud_ptr((const PointType*)cloud.ptr());
+ thrust::device_ptr<int> res_ptr(buffer.ptr());
- counting_iterator<int> first(0);
- counting_iterator<int> last = first + cloud.size();
+ thrust::counting_iterator<int> first(0);
+ thrust::counting_iterator<int> last = first + cloud.size();
//main bottle neck is a kernel call overhead/allocs
//work time for 871k points ~0.8ms
diff --git a/gpu/octree/src/cuda/octree_builder.cu b/gpu/octree/src/cuda/octree_builder.cu
index dfd2093..faad764 100644
--- a/gpu/octree/src/cuda/octree_builder.cu
+++ b/gpu/octree/src/cuda/octree_builder.cu
@@ -51,7 +51,6 @@
#include <thrust/device_ptr.h>
using namespace pcl::gpu;
-using namespace thrust;
namespace pcl
{
@@ -316,7 +315,7 @@ void pcl::device::OctreeImpl::build()
// 3 * sizeof(int) => +1 row
const int transaction_size = 128 / sizeof(int);
- int cols = max<int>(points_num, transaction_size * 4);
+ int cols = std::max<int>(points_num, transaction_size * 4);
int rows = 10 + 1; // = 13
storage.create(rows, cols);
@@ -338,8 +337,8 @@ void pcl::device::OctreeImpl::build()
{
//ScopeTimer timer("reduce-morton-sort-permutations");
- device_ptr<PointType> beg(points.ptr());
- device_ptr<PointType> end = beg + points.size();
+ thrust::device_ptr<PointType> beg(points.ptr());
+ thrust::device_ptr<PointType> end = beg + points.size();
{
PointType atmax, atmin;
@@ -355,15 +354,15 @@ void pcl::device::OctreeImpl::build()
octreeGlobal.maxp = make_float3(maxp.x, maxp.y, maxp.z);
}
- device_ptr<int> codes_beg(codes.ptr());
- device_ptr<int> codes_end = codes_beg + codes.size();
+ thrust::device_ptr<int> codes_beg(codes.ptr());
+ thrust::device_ptr<int> codes_end = codes_beg + codes.size();
{
//ScopeTimer timer("morton");
thrust::transform(beg, end, codes_beg, CalcMorton(octreeGlobal.minp, octreeGlobal.maxp));
}
- device_ptr<int> indices_beg(indices.ptr());
- device_ptr<int> indices_end = indices_beg + indices.size();
+ thrust::device_ptr<int> indices_beg(indices.ptr());
+ thrust::device_ptr<int> indices_end = indices_beg + indices.size();
{
//ScopeTimer timer("sort");
thrust::sequence(indices_beg, indices_end);
@@ -378,9 +377,9 @@ void pcl::device::OctreeImpl::build()
}
{
- device_ptr<float> xs(points_sorted.ptr(0));
- device_ptr<float> ys(points_sorted.ptr(1));
- device_ptr<float> zs(points_sorted.ptr(2));
+ thrust::device_ptr<float> xs(points_sorted.ptr(0));
+ thrust::device_ptr<float> ys(points_sorted.ptr(1));
+ thrust::device_ptr<float> zs(points_sorted.ptr(2));
//ScopeTimer timer("perm2");
thrust::transform(make_permutation_iterator(beg, indices_beg),
make_permutation_iterator(end, indices_end),

View File

@@ -0,0 +1,26 @@
From 3ea8aa5ded2782cfb10577348fc9f56144c72d7b Mon Sep 17 00:00:00 2001
From: raahilsha-z <raahil.sha@zimaging.io>
Date: Wed, 7 Jul 2021 15:57:46 -0400
Subject: [PATCH] fix numeric literals flag
---
CMakeLists.txt | 3 +++
1 file changed, 3 insertions(+)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7cf86f74b..e07fd430a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -420,6 +420,9 @@ endif()
# Boost (required)
include("${PCL_SOURCE_DIR}/cmake/pcl_find_boost.cmake")
+if (NOT APPLE AND NOT WIN32 AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
+ add_definitions(-fext-numeric-literals)
+endif()
### ---[ Create the config.h file
set(pcl_config_h_in "${CMAKE_CURRENT_SOURCE_DIR}/pcl_config.h.in")
--
2.32.0.windows.1

18
externals/vcpkg/ports/pcl/fix-pkgconfig.patch vendored Executable file
View File

@@ -0,0 +1,18 @@
diff --git a/cuda/common/CMakeLists.txt b/cuda/common/CMakeLists.txt
index b5775af..e7a2ff2 100644
--- a/cuda/common/CMakeLists.txt
+++ b/cuda/common/CMakeLists.txt
@@ -29,10 +29,10 @@ set(common_incs
)
include_directories(./include)
-#set(LIB_NAME pcl_${SUBSYS_NAME})
+set(LIB_NAME "pcl_${SUBSYS_NAME}")
set(EXT_DEPS CUDA)
-#PCL_MAKE_PKGCONFIG(${LIB_NAME} ${SUBSYS_NAME} "${SUBSYS_DESC}"
-# "${SUBSYS_DEPS}" "${EXT_DEPS}" "" "" "")
+PCL_MAKE_PKGCONFIG(${LIB_NAME} COMPONENT ${SUBSYS_NAME} DESC "${SUBSYS_DESC}"
+ PCL_DEPS "${SUBSYS_DEPS}" EXT_DEPS "" HEADER_ONLY)
# Install include files
PCL_ADD_INCLUDES(${SUBSYS_NAME} "cuda" ${incs})

View File

@@ -0,0 +1,13 @@
diff --git a/cmake/pcl_targets.cmake b/cmake/pcl_targets.cmake
index 91f2404..18f5a24 100644
--- a/cmake/pcl_targets.cmake
+++ b/cmake/pcl_targets.cmake
@@ -473,6 +473,8 @@ macro(PCL_ADD_EXAMPLE _name)
# add target to list of example targets created at the parent scope
list(APPEND PCL_EXAMPLES_ALL_TARGETS ${_name})
set(PCL_EXAMPLES_ALL_TARGETS "${PCL_EXAMPLES_ALL_TARGETS}" PARENT_SCOPE)
+
+ install(TARGETS ${_name} RUNTIME DESTINATION ${BIN_INSTALL_DIR})
endmacro()
###############################################################################

21
externals/vcpkg/ports/pcl/no-absolute.patch vendored Executable file
View File

@@ -0,0 +1,21 @@
diff --git a/PCLConfig.cmake.in b/PCLConfig.cmake.in
index 4137ed1..167fde2 100644
--- a/PCLConfig.cmake.in
+++ b/PCLConfig.cmake.in
@@ -230,7 +230,7 @@ macro(find_flann)
if(PCL_ALL_IN_ONE_INSTALLER)
set(FLANN_ROOT "${PCL_ROOT}/3rdParty/Flann")
elseif(NOT FLANN_ROOT)
- set(FLANN_ROOT "@FLANN_ROOT@")
+ set(FLANN_ROOT "${VCPKG_IMPORT_PREFIX}")
endif()
set(FLANN_USE_STATIC @FLANN_USE_STATIC@)
@@ -402,7 +402,6 @@ elseif(EXISTS "${PCL_DIR}/include/pcl/pcl_config.h")
# pcl_message("PCL found into a build tree.")
set(PCL_CONF_INCLUDE_DIR "${PCL_DIR}/include") # for pcl_config.h
set(PCL_LIBRARY_DIRS "${PCL_DIR}/@LIB_INSTALL_DIR@")
- set(PCL_SOURCES_TREE "@CMAKE_SOURCE_DIR@")
else()
pcl_report_not_found("PCL can not be found on this machine")
endif()

43
externals/vcpkg/ports/pcl/pcl_config.patch vendored Executable file
View File

@@ -0,0 +1,43 @@
From 2f4952e1767ad5b0349a03ee56d676d226102381 Mon Sep 17 00:00:00 2001
From: raahilsha-z <raahil.sha@zimaging.io>
Date: Wed, 7 Jul 2021 15:59:12 -0400
Subject: [PATCH] pcl_config
---
PCLConfig.cmake.in | 12 +++---------
1 file changed, 3 insertions(+), 9 deletions(-)
diff --git a/PCLConfig.cmake.in b/PCLConfig.cmake.in
index a1283a810..4137ed18c 100644
--- a/PCLConfig.cmake.in
+++ b/PCLConfig.cmake.in
@@ -384,6 +384,7 @@ file(TO_CMAKE_PATH "${PCL_DIR}" PCL_DIR)
if(WIN32 AND NOT MINGW)
# PCLConfig.cmake is installed to PCL_ROOT/cmake
get_filename_component(PCL_ROOT "${PCL_DIR}" PATH)
+ get_filename_component(PCL_ROOT "${PCL_ROOT}" PATH)
if(EXISTS "${PCL_ROOT}/3rdParty")
set(PCL_ALL_IN_ONE_INSTALLER ON)
endif()
@@ -393,16 +394,9 @@ else()
endif()
# check whether PCLConfig.cmake is found into a PCL installation or in a build tree
-if(EXISTS "${PCL_ROOT}/include/pcl-${PCL_VERSION_MAJOR}.${PCL_VERSION_MINOR}/pcl/pcl_config.h")
- # Found a PCL installation
- # pcl_message("Found a PCL installation")
- set(PCL_CONF_INCLUDE_DIR "${PCL_ROOT}/include/pcl-${PCL_VERSION_MAJOR}.${PCL_VERSION_MINOR}")
- set(PCL_LIBRARY_DIRS "${PCL_ROOT}/@LIB_INSTALL_DIR@")
-elseif(EXISTS "${PCL_ROOT}/include/pcl/pcl_config.h")
- # Found a non-standard (likely ANDROID) PCL installation
- # pcl_message("Found a PCL installation")
+if(EXISTS "${PCL_ROOT}/include/pcl/pcl_config.h")
set(PCL_CONF_INCLUDE_DIR "${PCL_ROOT}/include")
- set(PCL_LIBRARY_DIRS "${PCL_ROOT}/lib")
+ set(PCL_LIBRARY_DIRS "${PCL_ROOT}/@LIB_INSTALL_DIR@" "${PCL_ROOT}/debug/@LIB_INSTALL_DIR@")
elseif(EXISTS "${PCL_DIR}/include/pcl/pcl_config.h")
# Found PCLConfig.cmake in a build tree of PCL
# pcl_message("PCL found into a build tree.")
--
2.32.0.windows.1

40
externals/vcpkg/ports/pcl/pcl_utils.patch vendored Executable file
View File

@@ -0,0 +1,40 @@
From 6f4e2fea829b5986863403d6a611c52c5ac8b2a9 Mon Sep 17 00:00:00 2001
From: raahilsha-z <raahil.sha@zimaging.io>
Date: Wed, 7 Jul 2021 16:00:30 -0400
Subject: [PATCH] pcl_utils
---
cmake/pcl_utils.cmake | 13 ++-----------
1 file changed, 2 insertions(+), 11 deletions(-)
diff --git a/cmake/pcl_utils.cmake b/cmake/pcl_utils.cmake
index d87d02da9..7c951bfd5 100644
--- a/cmake/pcl_utils.cmake
+++ b/cmake/pcl_utils.cmake
@@ -94,21 +94,12 @@ macro(SET_INSTALL_DIRS)
if(NOT DEFINED LIB_INSTALL_DIR)
set(LIB_INSTALL_DIR "lib")
endif()
- if(NOT ANDROID)
- set(INCLUDE_INSTALL_ROOT
- "include/${PROJECT_NAME_LOWER}-${PCL_VERSION_MAJOR}.${PCL_VERSION_MINOR}")
- else()
- set(INCLUDE_INSTALL_ROOT "include") # Android, don't put into subdir
- endif()
+ set(INCLUDE_INSTALL_ROOT "include")
set(INCLUDE_INSTALL_DIR "${INCLUDE_INSTALL_ROOT}/pcl")
set(DOC_INSTALL_DIR "share/doc/${PROJECT_NAME_LOWER}-${PCL_VERSION_MAJOR}.${PCL_VERSION_MINOR}")
set(BIN_INSTALL_DIR "bin")
set(PKGCFG_INSTALL_DIR "${LIB_INSTALL_DIR}/pkgconfig")
- if(WIN32 AND NOT MINGW)
- set(PCLCONFIG_INSTALL_DIR "cmake")
- else()
- set(PCLCONFIG_INSTALL_DIR "share/${PROJECT_NAME_LOWER}-${PCL_VERSION_MAJOR}.${PCL_VERSION_MINOR}")
- endif()
+ set(PCLCONFIG_INSTALL_DIR "share/pcl")
endmacro()
--
2.32.0.windows.1

127
externals/vcpkg/ports/pcl/portfile.cmake vendored Executable file
View File

@@ -0,0 +1,127 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO PointCloudLibrary/pcl
REF f36a69a5e89953708990c4669317f989d532cf08 # pcl-1.12.0
SHA512 dbbd0adbb08949ddef2789e0021b6ca9727be33c7193d0bb135c61def09a42ed6a71333f06b6fad407010ecb4b73c19f087f7520386b92a008e90c254eafe422
HEAD_REF master
PATCHES
add-gcc-version-check.patch
fix-check-sse.patch
fix-find-qhull.patch
fix-numeric-literals-flag.patch
pcl_config.patch
pcl_utils.patch
remove-broken-targets.patch
fix-cmake_find_library_suffixes.patch
fix-pkgconfig.patch # Remove this patch in the next update
fix-namespace-cub.patch # Remove this patch in the next update
fix-error-C3052.patch # Remove this patch in the next update
fix-find-libusb.patch
install-examples.patch
no-absolute.patch
Workaround-ICE-in-release.patch
)
file(REMOVE "${SOURCE_PATH}/cmake/Modules/FindQhull.cmake"
"${SOURCE_PATH}/cmake/Modules/Findlibusb.cmake"
)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" PCL_SHARED_LIBS)
if ("cuda" IN_LIST FEATURES AND VCPKG_TARGET_ARCHITECTURE STREQUAL x86)
message(FATAL_ERROR "Feature cuda only supports 64-bit compilation.")
endif()
if ("tools" IN_LIST FEATURES AND VCPKG_LIBRARY_LINKAGE STREQUAL static)
message(FATAL_ERROR "Feature tools only supports dynamic build")
endif()
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
openni2 WITH_OPENNI2
qt WITH_QT
pcap WITH_PCAP
cuda WITH_CUDA
cuda BUILD_CUDA
cuda BUILD_GPU
tools BUILD_tools
opengl WITH_OPENGL
libusb WITH_LIBUSB
visualization WITH_VTK
visualization BUILD_visualization
examples BUILD_examples
apps BUILD_apps
# These 2 apps need openni1
#apps BUILD_apps_in_hand_scanner
#apps BUILD_apps_3d_rec_framework
simulation BUILD_simulation
)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
# BUILD
-DBUILD_surface_on_nurbs=ON
# PCL
-DPCL_BUILD_WITH_BOOST_DYNAMIC_LINKING_WIN32=${PCL_SHARED_LIBS}
-DPCL_BUILD_WITH_FLANN_DYNAMIC_LINKING_WIN32=${PCL_SHARED_LIBS}
-DPCL_BUILD_WITH_QHULL_DYNAMIC_LINKING_WIN32=${PCL_SHARED_LIBS}
-DPCL_SHARED_LIBS=${PCL_SHARED_LIBS}
# WITH
-DWITH_PNG=ON
-DWITH_QHULL=ON
-DWITH_OPENNI=OFF
-DWITH_ENSENSO=OFF
-DWITH_DAVIDSDK=OFF
-DWITH_DSSDK=OFF
-DWITH_RSSDK=OFF
-DWITH_RSSDK2=OFF
-DWITH_OPENMP=OFF
# FEATURES
${FEATURE_OPTIONS}
MAYBE_UNUSED_VARIABLES
PCL_BUILD_WITH_FLANN_DYNAMIC_LINKING_WIN32
)
vcpkg_cmake_install()
vcpkg_cmake_config_fixup()
vcpkg_copy_pdbs()
if (WITH_OPENNI2)
if (NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
file(GLOB PCL_PKGCONFIG_DBGS "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/*.pc")
foreach (PCL_PKGCONFIG IN LISTS PCL_PKGCONFIG_DBGS)
file(READ "${PCL_PKGCONFIG}" PCL_PC_DBG)
if (PCL_PC_DBG MATCHES "libopenni2")
string(REPLACE "libopenni2" "" PCL_PC_DBG "${PCL_PC_DBG}")
string(REPLACE "Libs: " "Libs: -lKinect10 -lOpenNI2 " PCL_PC_DBG "${PCL_PC_DBG}")
file(WRITE "${PCL_PKGCONFIG}" "${PCL_PC_DBG}")
endif()
endforeach()
endif()
if (NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
file(GLOB PCL_PKGCONFIG_RELS "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/*.pc")
foreach (PCL_PKGCONFIG IN LISTS PCL_PKGCONFIG_RELS)
file(READ "${PCL_PKGCONFIG}" PCL_PC_REL)
if (PCL_PC_REL MATCHES "libopenni2")
string(REPLACE "libopenni2" "" PCL_PC_REL "${PCL_PC_REL}")
string(REPLACE "Libs: " "Libs: -lKinect10 -lOpenNI2 " PCL_PC_REL "${PCL_PC_REL}")
file(WRITE "${PCL_PKGCONFIG}" "${PCL_PC_REL}")
endif()
endforeach()
endif()
endif()
vcpkg_fixup_pkgconfig()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
if(BUILD_tools OR BUILD_apps OR BUILD_examples)
file(GLOB EXEFILES_RELEASE "${CURRENT_PACKAGES_DIR}/bin/*${VCPKG_TARGET_EXECUTABLE_SUFFIX}")
file(GLOB EXEFILES_DEBUG "${CURRENT_PACKAGES_DIR}/debug/bin/*${VCPKG_TARGET_EXECUTABLE_SUFFIX}")
file(COPY ${EXEFILES_RELEASE} DESTINATION "${CURRENT_PACKAGES_DIR}/tools/pcl")
file(REMOVE ${EXEFILES_RELEASE} ${EXEFILES_DEBUG})
vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/pcl")
endif()
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)

View File

@@ -0,0 +1,32 @@
From 1b2613e1df507fd868b4971294f9a28183ce2e6c Mon Sep 17 00:00:00 2001
From: raahilsha-z <raahil.sha@zimaging.io>
Date: Wed, 7 Jul 2021 16:01:03 -0400
Subject: [PATCH] remove broken targets
---
tools/CMakeLists.txt | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt
index 5bfe6e94c..7abf3d746 100644
--- a/tools/CMakeLists.txt
+++ b/tools/CMakeLists.txt
@@ -123,15 +123,6 @@ target_link_libraries(pcl_concatenate_points_pcd pcl_common pcl_io)
PCL_ADD_EXECUTABLE(pcl_poisson_reconstruction COMPONENT ${SUBSYS_NAME} SOURCES poisson_reconstruction.cpp)
target_link_libraries(pcl_poisson_reconstruction pcl_common pcl_io pcl_surface)
-PCL_ADD_EXECUTABLE(pcl_train_linemod_template COMPONENT ${SUBSYS_NAME} SOURCES train_linemod_template.cpp)
-target_link_libraries(pcl_train_linemod_template pcl_common pcl_io pcl_segmentation pcl_recognition)
-
-PCL_ADD_EXECUTABLE(pcl_match_linemod_template COMPONENT ${SUBSYS_NAME} SOURCES match_linemod_template.cpp)
-target_link_libraries(pcl_match_linemod_template pcl_common pcl_io pcl_recognition)
-
-PCL_ADD_EXECUTABLE(pcl_linemod_detection COMPONENT ${SUBSYS_NAME} SOURCES linemod_detection.cpp)
-target_link_libraries(pcl_linemod_detection pcl_common pcl_io pcl_recognition)
-
PCL_ADD_EXECUTABLE(pcl_fast_bilateral_filter COMPONENT ${SUBSYS_NAME} SOURCES fast_bilateral_filter.cpp)
target_link_libraries(pcl_fast_bilateral_filter pcl_common pcl_io pcl_filters)
--
2.32.0.windows.1

4
externals/vcpkg/ports/pcl/usage vendored Executable file
View File

@@ -0,0 +1,4 @@
The package pcl provides CMake targets:
find_package(PCL CONFIG REQUIRED)
target_link_libraries(main PRIVATE ${PCL_LIBRARIES})

153
externals/vcpkg/ports/pcl/vcpkg.json vendored Executable file
View File

@@ -0,0 +1,153 @@
{
"name": "pcl",
"version": "1.12.0",
"port-version": 6,
"description": "Point Cloud Library (PCL) is open source library for 2D/3D image and point cloud processing.",
"homepage": "https://github.com/PointCloudLibrary/pcl",
"license": "BSD-3-Clause",
"supports": "!(arm64 & windows)",
"dependencies": [
"boost-asio",
"boost-date-time",
"boost-dynamic-bitset",
"boost-filesystem",
"boost-foreach",
"boost-graph",
"boost-interprocess",
"boost-iostreams",
"boost-multi-array",
"boost-property-map",
"boost-ptr-container",
"boost-random",
"boost-signals2",
"boost-sort",
"boost-system",
"boost-thread",
"boost-uuid",
"eigen3",
"flann",
"libpng",
"qhull",
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
],
"features": {
"apps": {
"description": "Build application examples/samples that show how PCL works",
"dependencies": [
{
"name": "pcl",
"default-features": false,
"features": [
"opengl",
"openni2",
"qt",
"vtk"
]
}
]
},
"cuda": {
"description": "CUDA support for PCL",
"dependencies": [
"cuda"
]
},
"examples": {
"description": "Build PCL examples",
"dependencies": [
"vtk"
]
},
"libusb": {
"description": "Build USB RGBD-Camera drivers",
"dependencies": [
"libusb"
]
},
"opengl": {
"description": "OpenGL support for PCL"
},
"openni2": {
"description": "OpenNI2 support for PCL",
"dependencies": [
"openni2",
{
"name": "pcl",
"default-features": false,
"features": [
"libusb"
],
"platform": "!windows"
}
]
},
"pcap": {
"description": "PCAP support for PCL",
"dependencies": [
{
"name": "libpcap",
"platform": "!windows"
},
{
"name": "winpcap",
"platform": "windows"
}
]
},
"qt": {
"description": "Qt support for PCL",
"dependencies": [
{
"name": "vtk",
"features": [
"qt"
]
}
]
},
"simulation": {
"description": "Build Point Cloud Library Simulation",
"dependencies": [
"glew",
{
"name": "pcl",
"default-features": false,
"features": [
"opengl"
]
}
]
},
"tools": {
"description": "Build PCL utilities",
"dependencies": [
"boost-accumulators"
]
},
"visualization": {
"description": "Build visualization",
"dependencies": [
"vtk"
]
},
"vtk": {
"description": "An alias for visualization",
"dependencies": [
{
"name": "pcl",
"default-features": false,
"features": [
"visualization"
]
}
]
}
}
}