[pcl] Update to 1.10.0 (#10042)

This commit is contained in:
Jack·Boos·Yu 2020-08-18 15:20:22 -07:00 committed by GitHub
parent 272269583c
commit b54f17e394
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 141 additions and 413 deletions

View File

@ -1,8 +1,8 @@
Source: pcl
Version: 1.9.1-13
Version: 1.11.0
Homepage: https://github.com/PointCloudLibrary/pcl
Description: Point Cloud Library (PCL) is open source library for 2D/3D image and point cloud processing.
Build-Depends: eigen3, flann, qhull, vtk, libpng, boost-system, boost-filesystem, boost-thread, boost-date-time, boost-iostreams, boost-random, boost-foreach, boost-dynamic-bitset, boost-property-map, boost-graph, boost-multi-array, boost-signals2, boost-ptr-container, boost-uuid, boost-interprocess, boost-asio
Build-Depends: eigen3, flann, qhull, vtk, libpng, boost-system, boost-filesystem, boost-thread, boost-date-time, boost-iostreams, boost-random, boost-foreach, boost-dynamic-bitset, boost-property-map, boost-graph, boost-multi-array, boost-signals2, boost-sort, boost-ptr-container, boost-uuid, boost-interprocess, boost-asio
Feature: openni2
Description: OpenNI2 support for PCL

View File

@ -1,27 +1,14 @@
diff --git a/segmentation/include/pcl/segmentation/supervoxel_clustering.h b/segmentation/include/pcl/segmentation/supervoxel_clustering.h
index 05e6002..99e3a07 100644
--- a/segmentation/include/pcl/segmentation/supervoxel_clustering.h
+++ b/segmentation/include/pcl/segmentation/supervoxel_clustering.h
@@ -525,7 +525,7 @@ namespace pcl
};
//Make boost::ptr_list can access the private class SupervoxelHelper
- friend void boost::checked_delete<> (const typename pcl::SupervoxelClustering<PointT>::SupervoxelHelper *);
+ //friend void boost::checked_delete<> (const typename pcl::SupervoxelClustering<PointT>::SupervoxelHelper *);
typedef boost::ptr_list<SupervoxelHelper> HelperListT;
HelperListT supervoxel_helpers_;
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 68cc438..8cfa1c6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -416,6 +416,9 @@ endif()
# Boost (required)
include("${PCL_SOURCE_DIR}/cmake/pcl_find_boost.cmake")
+if (NOT APPLE)
+ add_definitions(-fext-numeric-literals)
+endif()
### ---[ Create the config.h file
set(pcl_config_h_in "${CMAKE_CURRENT_SOURCE_DIR}/pcl_config.h.in")
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b301cf1..789b660 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -462,6 +462,9 @@ endif()
# Boost (required)
include("${PCL_SOURCE_DIR}/cmake/pcl_find_boost.cmake")
+if (NOT APPLE AND NOT WIN32)
+ add_definitions(-fext-numeric-literals)
+endif()
### ---[ Create the config.h file
set(pcl_config_h_in "${CMAKE_CURRENT_SOURCE_DIR}/pcl_config.h.in")

View File

@ -1,50 +0,0 @@
diff --git a/common/include/pcl/PCLPointCloud2.h b/common/include/pcl/PCLPointCloud2.h
index 6a00c1f..5d4ac1c 100644
--- a/common/include/pcl/PCLPointCloud2.h
+++ b/common/include/pcl/PCLPointCloud2.h
@@ -8,7 +8,7 @@
#include <string>
#include <vector>
#include <ostream>
-#include <boost/detail/endian.hpp>
+#include <boost/predef/other/endian.h>
// Include the correct Header path here
#include <pcl/PCLHeader.h>
@@ -23,9 +23,9 @@ namespace pcl
is_bigendian (false), point_step (0), row_step (0),
data (), is_dense (false)
{
-#if defined(BOOST_BIG_ENDIAN)
+#if BOOST_ENDIAN_BIG_BYTE
is_bigendian = true;
-#elif defined(BOOST_LITTLE_ENDIAN)
+#elif BOOST_ENDIAN_LITTLE_BYTE
is_bigendian = false;
#else
#error "unable to determine system endianness"
diff --git a/io/include/pcl/io/ply/byte_order.h b/io/include/pcl/io/ply/byte_order.h
index 2af95d0..8328015 100644
--- a/io/include/pcl/io/ply/byte_order.h
+++ b/io/include/pcl/io/ply/byte_order.h
@@ -40,7 +40,7 @@
#ifndef PCL_IO_PLY_BYTE_ORDER_H
#define PCL_IO_PLY_BYTE_ORDER_H
-#include <boost/detail/endian.hpp>
+#include <boost/predef/other/endian.h>
namespace pcl
{
@@ -58,9 +58,9 @@ namespace pcl
{
little_endian_byte_order,
big_endian_byte_order,
-#if defined(BOOST_BIG_ENDIAN)
+#if BOOST_ENDIAN_BIG_BYTE
host_byte_order = big_endian_byte_order,
-#elif defined(BOOST_LITTLE_ENDIAN)
+#elif BOOST_ENDIAN_LITTLE_BYTE
host_byte_order = little_endian_byte_order,
#else
#error "unable to determine system endianness"

View File

@ -1,133 +0,0 @@
diff --git a/cuda/common/include/pcl/cuda/thrust.h b/cuda/common/include/pcl/cuda/thrust.h
index 57586ab..af073d7 100644
--- a/cuda/common/include/pcl/cuda/thrust.h
+++ b/cuda/common/include/pcl/cuda/thrust.h
@@ -42,6 +42,7 @@
#include <thrust/host_vector.h>
#include <thrust/device_vector.h>
+#include <thrust/device_malloc.h>
#include <thrust/copy.h>
#include <thrust/device_ptr.h>
#include <thrust/sequence.h>
diff --git a/gpu/features/src/fpfh.cu b/gpu/features/src/fpfh.cu
index 8d34f76..59a5f0c 100644
--- a/gpu/features/src/fpfh.cu
+++ b/gpu/features/src/fpfh.cu
@@ -231,12 +231,12 @@ namespace pcl
int *sinds = sindices + Warp::WARP_SIZE * warp_idx;
int size = sizes[idx];
- for(int i = lane; __any(i < size); i += Warp::STRIDE)
+ for(int i = lane; __any_sync(0xFFFFFFFF, i < size); i += Warp::STRIDE)
{
if (i < size)
sinds[lane] = ginds[i];
- int inds_num = __popc(__ballot(i < size));
+ int inds_num = __popc(__ballot_sync(0xFFFFFFFF, i < size));
for(int j = 0; j < inds_num; ++j)
{
diff --git a/gpu/octree/src/cuda/approx_nsearch.cu b/gpu/octree/src/cuda/approx_nsearch.cu
index e457255..3e1adfe 100644
--- a/gpu/octree/src/cuda/approx_nsearch.cu
+++ b/gpu/octree/src/cuda/approx_nsearch.cu
@@ -141,7 +141,7 @@ namespace pcl { namespace device { namespace appnearest_search
{
__shared__ volatile int per_warp_buffer[KernelPolicy::WARPS_COUNT];
- int mask = __ballot(node_idx != -1);
+ int mask = __ballot_sync(0xFFFFFFFF, node_idx != -1);
while(mask)
{
@@ -275,7 +275,7 @@ namespace pcl { namespace device { namespace appnearest_search
bool active = query_index < batch.queries_num;
- if (__all(active == false))
+ if (__all_sync(0xFFFFFFFF, active == false))
return;
Warp_appNearestSearch search(batch, query_index);
diff --git a/gpu/octree/src/cuda/knn_search.cu b/gpu/octree/src/cuda/knn_search.cu
index a99655d..b55e3c1 100644
--- a/gpu/octree/src/cuda/knn_search.cu
+++ b/gpu/octree/src/cuda/knn_search.cu
@@ -106,7 +106,7 @@ namespace pcl { namespace device { namespace knn_search
else
query_index = -1;
- while(__any(active))
+ while(__any_sync(0xFFFFFFFF, active))
{
int leaf = -1;
@@ -163,7 +163,7 @@ namespace pcl { namespace device { namespace knn_search
__device__ __forceinline__ void processLeaf(int node_idx)
{
- int mask = __ballot(node_idx != -1);
+ int mask = __ballot_sync(0xFFFFFFFF, node_idx != -1);
unsigned int laneId = Warp::laneId();
unsigned int warpId = Warp::id();
@@ -310,7 +310,7 @@ namespace pcl { namespace device { namespace knn_search
bool active = query_index < batch.queries_num;
- if (__all(active == false))
+ if (__all_sync(0xFFFFFFFF, active == false))
return;
Warp_knnSearch search(batch, query_index);
diff --git a/gpu/octree/src/cuda/radius_search.cu b/gpu/octree/src/cuda/radius_search.cu
index f90273f..8ae84e7 100644
--- a/gpu/octree/src/cuda/radius_search.cu
+++ b/gpu/octree/src/cuda/radius_search.cu
@@ -155,7 +155,7 @@ namespace pcl
else
query_index = -1;
- while(__any(active))
+ while(__any_sync(0xFFFFFFFF, active))
{
int leaf = -1;
@@ -217,7 +217,7 @@ namespace pcl
__device__ __forceinline__ void processLeaf(int leaf)
{
- int mask = __ballot(leaf != -1);
+ int mask = __ballot_sync(0xFFFFFFFF, leaf != -1);
while(mask)
{
@@ -255,7 +255,7 @@ namespace pcl
int *out = batch.output + active_query_index * batch.max_results + active_found_count;
int length_left = batch.max_results - active_found_count;
- int test = __any(active_lane == laneId && (leaf & KernelPolicy::CHECK_FLAG));
+ int test = __any_sync(0xFFFFFFFF, active_lane == laneId && (leaf & KernelPolicy::CHECK_FLAG));
if (test)
{
@@ -329,7 +329,7 @@ namespace pcl
total_new += new_nodes;
out += new_nodes;
- if (__all(idx >= length) || __any(out_of_bounds) || total_new == length_left)
+ if (__all_sync(0xFFFFFFFF, idx >= length) || __any_sync(0xFFFFFFFF, out_of_bounds) || total_new == length_left)
break;
}
return min(total_new, length_left);
@@ -343,7 +343,7 @@ namespace pcl
bool active = query_index < batch.queries.size;
- if (__all(active == false))
+ if (__all_sync(0xFFFFFFFF, active == false))
return;
Warp_radiusSearch<BatchType> search(batch, query_index);

View File

@ -1,20 +1,20 @@
diff --git a/io/CMakeLists.txt b/io/CMakeLists.txt
index a17cb2d..b2a56b3 100644
index f234971..86ea242 100644
--- a/io/CMakeLists.txt
+++ b/io/CMakeLists.txt
@@ -330,11 +330,13 @@ if(build)
add_definitions(${VTK_DEFINES})
PCL_ADD_LIBRARY("${LIB_NAME}" "${SUBSYS_NAME}" ${srcs} ${incs} ${compression_incs} ${impl_incs} ${OPENNI_INCLUDES} ${OPENNI2_INCLUDES})
target_include_directories(${LIB_NAME} PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include" ${VTK_INCLUDE_DIRECTORIES})
- link_directories(${VTK_LINK_DIRECTORIES})
- target_link_libraries("${LIB_NAME}" pcl_common pcl_io_ply ${VTK_LIBRARIES} )
+
if(PNG_FOUND)
target_link_libraries("${LIB_NAME}" ${PNG_LIBRARIES})
endif(PNG_FOUND)
+
+ link_directories(${VTK_LINK_DIRECTORIES})
+ target_link_libraries("${LIB_NAME}" pcl_common pcl_io_ply ${VTK_LIBRARIES} )
@@ -333,12 +333,13 @@ 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})
target_include_directories(${LIB_NAME} PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include")
-link_directories(${VTK_LINK_DIRECTORIES})
-target_link_libraries("${LIB_NAME}" pcl_common pcl_io_ply ${VTK_LIBRARIES})
if(PNG_FOUND)
target_link_libraries("${LIB_NAME}" ${PNG_LIBRARIES})
endif()
if(LIBUSB_1_FOUND)
target_link_libraries("${LIB_NAME}" ${LIBUSB_1_LIBRARIES})
+link_directories(${VTK_LINK_DIRECTORIES})
+target_link_libraries("${LIB_NAME}" pcl_common pcl_io_ply ${VTK_LIBRARIES})
+
if(LIBUSB_1_FOUND)
target_link_libraries("${LIB_NAME}" ${LIBUSB_1_LIBRARIES})
endif()

View File

@ -1,45 +1,33 @@
diff --git a/PCLConfig.cmake.in b/PCLConfig.cmake.in
index 7ec40baa0..837d78c82 100644
index 9f78fcf..0cbe94f 100644
--- a/PCLConfig.cmake.in
+++ b/PCLConfig.cmake.in
@@ -388,25 +388,18 @@ file(TO_CMAKE_PATH "${PCL_DIR}" PCL_DIR)
@@ -396,25 +396,16 @@ 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)
else(WIN32 AND NOT MINGW)
else()
# PCLConfig.cmake is installed to PCL_ROOT/share/pcl-x.y
get_filename_component(PCL_ROOT "${CMAKE_CURRENT_LIST_DIR}/../.." ABSOLUTE)
endif(WIN32 AND NOT MINGW)
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")
+if(EXISTS "${PCL_ROOT}/include/pcl/pcl_config.h")
# Found a PCL installation
# pcl_message("Found a PCL installation")
- set(PCL_INCLUDE_DIRS "${PCL_ROOT}/include/pcl-${PCL_VERSION_MAJOR}.${PCL_VERSION_MINOR}")
- # 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@")
- if(EXISTS "${PCL_ROOT}/3rdParty")
- set(PCL_ALL_IN_ONE_INSTALLER ON)
- endif(EXISTS "${PCL_ROOT}/3rdParty")
- endif()
-elseif(EXISTS "${PCL_ROOT}/include/pcl/pcl_config.h")
- # Found a non-standard (likely ANDROID) PCL installation
- # pcl_message("Found a PCL installation")
set(PCL_INCLUDE_DIRS "${PCL_ROOT}/include")
+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@")
if(EXISTS "${PCL_ROOT}/3rdParty")
set(PCL_ALL_IN_ONE_INSTALLER ON)
endif(EXISTS "${PCL_ROOT}/3rdParty")
@@ -416,9 +409,9 @@ elseif(EXISTS "${PCL_DIR}/include/pcl/pcl_config.h")
set(PCL_INCLUDE_DIRS "${PCL_DIR}/include") # for pcl_config.h
set(PCL_LIBRARY_DIRS "${PCL_DIR}/@LIB_INSTALL_DIR@")
set(PCL_SOURCES_TREE "@CMAKE_SOURCE_DIR@")
-else(EXISTS "${PCL_ROOT}/include/pcl-${PCL_VERSION_MAJOR}.${PCL_VERSION_MINOR}/pcl/pcl_config.h")
+else(EXISTS "${PCL_ROOT}/include/pcl/pcl_config.h")
pcl_report_not_found("PCL can not be found on this machine")
-endif(EXISTS "${PCL_ROOT}/include/pcl-${PCL_VERSION_MAJOR}.${PCL_VERSION_MINOR}/pcl/pcl_config.h")
+endif(EXISTS "${PCL_ROOT}/include/pcl/pcl_config.h")
#set a suffix for debug libraries
set(PCL_DEBUG_SUFFIX "@CMAKE_DEBUG_POSTFIX@")
endif()

View File

@ -1,28 +1,28 @@
diff --git a/cmake/pcl_utils.cmake b/cmake/pcl_utils.cmake
index f523dbc8c..a171b6d24 100644
index d87d02d..7c951bf 100644
--- a/cmake/pcl_utils.cmake
+++ b/cmake/pcl_utils.cmake
@@ -97,21 +97,12 @@ macro(SET_INSTALL_DIRS)
if (NOT DEFINED LIB_INSTALL_DIR)
@@ -94,21 +94,12 @@ macro(SET_INSTALL_DIRS)
if(NOT DEFINED LIB_INSTALL_DIR)
set(LIB_INSTALL_DIR "lib")
endif (NOT DEFINED LIB_INSTALL_DIR)
endif()
- if(NOT ANDROID)
- set(INCLUDE_INSTALL_ROOT
- "include/${PROJECT_NAME_LOWER}-${PCL_VERSION_MAJOR}.${PCL_VERSION_MINOR}")
- else(NOT ANDROID)
- else()
- set(INCLUDE_INSTALL_ROOT "include") # Android, don't put into subdir
- endif(NOT ANDROID)
+ set(INCLUDE_INSTALL_ROOT "include")
- 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(WIN32 AND NOT MINGW)
- else()
- set(PCLCONFIG_INSTALL_DIR "share/${PROJECT_NAME_LOWER}-${PCL_VERSION_MAJOR}.${PCL_VERSION_MINOR}")
- endif(WIN32 AND NOT MINGW)
- endif()
+ set(PCLCONFIG_INSTALL_DIR "share/pcl")
endmacro(SET_INSTALL_DIRS)
endmacro()

View File

@ -1,25 +1,30 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO PointCloudLibrary/pcl
REF pcl-1.9.1
SHA512 ca95028c23861ac2df0fa7e18fdd0202255cb2e49ab714325eb36c35289442c6eedbf489e6f9f232b30fa2a93eff4c9619f8a14d3fdfe58f353a4a6e26206bdf
REF f9f214f34a38d5bb67441140703a681c5d299906 # pcl-1.11.0
SHA512 7d1bbadcd6843001895bd1faeb5ad4166f7746bf77f83573160507746d438797fbe9e283a8989f517fe1dc7195934ad59e008b4fce61e5943ce6426d49141365
HEAD_REF master
PATCHES
pcl_utils.patch
pcl_config.patch
use_flann_targets.patch
boost-1.70.patch
cuda_10_1.patch
# Patch for https://github.com/microsoft/vcpkg/issues/7660
use_target_link_libraries_in_pclconfig.patch
fix-link-libpng.patch
boost-1.73.patch
remove-broken-targets.patch
)
file(REMOVE ${SOURCE_PATH}/cmake/Modules/FindFLANN.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
openni2 WITH_OPENNI2
qt WITH_QT

View File

@ -0,0 +1,20 @@
diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt
index 1911f7b..11566a2 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)

View File

@ -1,8 +1,8 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0b4c1a3..94bb484 100755
index 93a6448..b24f681 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -280,11 +280,9 @@ find_package(Eigen REQUIRED)
@@ -302,10 +302,9 @@ find_package(Eigen 3.1 REQUIRED)
include_directories(SYSTEM ${EIGEN_INCLUDE_DIRS})
# FLANN (required)
@ -11,145 +11,87 @@ index 0b4c1a3..94bb484 100755
-endif()
+set(FLANN_USE_STATIC ON)
find_package(FLANN 1.7.0 REQUIRED)
-include_directories(${FLANN_INCLUDE_DIRS})
+find_package(lz4)
# libusb-1.0
option(WITH_LIBUSB "Build USB RGBD-Camera drivers" TRUE)
diff --git a/PCLConfig.cmake.in b/PCLConfig.cmake.in
index 6fadb59..6a9c5b7 100755
index 79077fb..042467b 100644
--- a/PCLConfig.cmake.in
+++ b/PCLConfig.cmake.in
@@ -226,12 +226,6 @@ endmacro(find_rssdk)
@@ -88,11 +88,6 @@ endmacro()
#remove this as soon as flann is shipped with FindFlann.cmake
macro(find_flann)
### ---[ 3rd party libraries
macro(find_boost)
- if(PCL_ALL_IN_ONE_INSTALLER)
- set(FLANN_ROOT "${PCL_ROOT}/3rdParty/Flann")
- elseif(NOT FLANN_ROOT)
- get_filename_component(FLANN_ROOT "@FLANN_INCLUDE_DIRS@" PATH)
- endif(PCL_ALL_IN_ONE_INSTALLER)
-
set(FLANN_USE_STATIC @FLANN_USE_STATIC@)
find_package(FLANN)
endmacro(find_flann)
@@ -651,7 +645,7 @@ endif(NOT "${PCL_DEFINITIONS}" STREQUAL "")
pcl_remove_duplicate_libraries(PCL_COMPONENTS PCL_LIBRARIES)
- set(BOOST_ROOT "${PCL_ROOT}/3rdParty/Boost")
- elseif(NOT BOOST_INCLUDEDIR)
- set(BOOST_INCLUDEDIR "@Boost_INCLUDE_DIR@")
- endif()
# use static Boost in Windows
if(WIN32)
set(Boost_USE_STATIC_LIBS @Boost_USE_STATIC_LIBS@)
@@ -667,8 +662,8 @@ pcl_remove_duplicate_libraries(PCL_COMPONENTS PCL_LIBRARIES)
# Add 3rd party libraries, as user code might include our .HPP implementations
-list(APPEND PCL_LIBRARIES ${BOOST_LIBRARIES} ${QHULL_LIBRARIES} ${OPENNI_LIBRARIES} ${OPENNI2_LIBRARIES} ${ENSENSO_LIBRARIES} ${davidSDK_LIBRARIES} ${DSSDK_LIBRARIES} ${RSSDK_LIBRARIES} ${FLANN_LIBRARIES} ${VTK_LIBRARIES})
+list(APPEND PCL_LIBRARIES ${BOOST_LIBRARIES} ${QHULL_LIBRARIES} ${OPENNI_LIBRARIES} ${OPENNI2_LIBRARIES} ${ENSENSO_LIBRARIES} ${davidSDK_LIBRARIES} ${DSSDK_LIBRARIES} ${RSSDK_LIBRARIES} flann::flann_cpp ${VTK_LIBRARIES})
list(APPEND PCL_LIBRARIES ${BOOST_LIBRARIES} ${QHULL_LIBRARIES} ${OPENNI_LIBRARIES} ${OPENNI2_LIBRARIES} ${ENSENSO_LIBRARIES} ${davidSDK_LIBRARIES} ${DSSDK_LIBRARIES} ${RSSDK_LIBRARIES} ${RSSDK2_LIBRARIES} ${VTK_LIBRARIES})
-if (TARGET FLANN::FLANN)
- list(APPEND PCL_LIBRARIES FLANN::FLANN)
+if (TARGET flann::flann_cpp)
+ list(APPEND PCL_LIBRARIES flann::flann_cpp)
endif()
find_package_handle_standard_args(PCL DEFAULT_MSG PCL_LIBRARIES PCL_INCLUDE_DIRS)
mark_as_advanced(PCL_LIBRARIES PCL_INCLUDE_DIRS PCL_LIBRARY_DIRS)
diff --git a/doc/tutorials/content/sources/vfh_recognition/CMakeLists.txt b/doc/tutorials/content/sources/vfh_recognition/CMakeLists.txt
index 9693792..dcd4373 100755
index 7d25d3f..18227a6 100644
--- a/doc/tutorials/content/sources/vfh_recognition/CMakeLists.txt
+++ b/doc/tutorials/content/sources/vfh_recognition/CMakeLists.txt
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
@@ -16,7 +16,7 @@ include_directories(SYSTEM
-# we need FindFLANN.cmake
+# we need FindFLANN.cmake
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR})
add_executable(build_tree build_tree.cpp)
target_link_libraries(build_tree ${PCL_LIBRARIES} ${Boost_LIBRARIES}
- FLANN::FLANN ${HDF5_LIBRARIES})
+ flann::flann_cpp ${HDF5_LIBRARIES})
project(vfh_cluster_classifier)
@@ -14,16 +14,15 @@ find_package(HDF5)
if(HDF5_FOUND)
find_package(FLANN)
- include_directories(${FLANN_INCLUDE_DIRS})
include_directories(${HDF5_INCLUDE_DIR})
add_executable(build_tree build_tree.cpp)
target_link_libraries(build_tree ${PCL_LIBRARIES} ${Boost_LIBRARIES}
- ${FLANN_LIBRARIES} ${HDF5_hdf5_LIBRARY})
+ flann::flann_cpp ${HDF5_hdf5_LIBRARY})
add_executable(nearest_neighbors nearest_neighbors.cpp)
- target_link_libraries(nearest_neighbors ${PCL_LIBRARIES}
- ${Boost_LIBRARIES} ${FLANN_LIBRARIES} ${HDF5_hdf5_LIBRARY}
+ target_link_libraries(nearest_neighbors ${PCL_LIBRARIES}
+ ${Boost_LIBRARIES} flann::flann_cpp ${HDF5_hdf5_LIBRARY}
)
endif(HDF5_FOUND)
add_executable(nearest_neighbors nearest_neighbors.cpp)
-target_link_libraries(nearest_neighbors ${PCL_LIBRARIES} ${Boost_LIBRARIES} FLANN::FLANN ${HDF5_LIBRARIES})
+target_link_libraries(nearest_neighbors ${PCL_LIBRARIES} ${Boost_LIBRARIES} flann::flann_cpp ${HDF5_LIBRARIES})
diff --git a/kdtree/CMakeLists.txt b/kdtree/CMakeLists.txt
index 311dffc..1a7712f 100755
index 826e902..f714130 100644
--- a/kdtree/CMakeLists.txt
+++ b/kdtree/CMakeLists.txt
@@ -9,18 +9,18 @@ PCL_SUBSYS_DEPEND(build "${SUBSYS_NAME}" DEPS ${SUBSYS_DEPS} EXT_DEPS flann)
PCL_ADD_DOC("${SUBSYS_NAME}")
@@ -31,7 +31,7 @@ set(impl_incs
set(LIB_NAME "pcl_${SUBSYS_NAME}")
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include")
PCL_ADD_LIBRARY(${LIB_NAME} COMPONENT ${SUBSYS_NAME} SOURCES ${srcs} ${incs} ${impl_incs})
-target_link_libraries("${LIB_NAME}" pcl_common FLANN::FLANN)
+target_link_libraries("${LIB_NAME}" pcl_common flann::flann_cpp)
set(EXT_DEPS flann)
PCL_MAKE_PKGCONFIG(${LIB_NAME} COMPONENT ${SUBSYS_NAME} DESC ${SUBSYS_DESC} PCL_DEPS ${SUBSYS_DEPS} EXT_DEPS ${EXT_DEPS})
if(build)
- set(srcs
+ set(srcs
src/kdtree_flann.cpp
)
- set(incs
+ set(incs
"include/pcl/${SUBSYS_NAME}/kdtree.h"
"include/pcl/${SUBSYS_NAME}/io.h"
"include/pcl/${SUBSYS_NAME}/flann.h"
"include/pcl/${SUBSYS_NAME}/kdtree_flann.h"
)
- set(impl_incs
+ set(impl_incs
"include/pcl/${SUBSYS_NAME}/impl/io.hpp"
"include/pcl/${SUBSYS_NAME}/impl/kdtree_flann.hpp"
)
@@ -28,7 +28,7 @@ if(build)
set(LIB_NAME "pcl_${SUBSYS_NAME}")
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include")
PCL_ADD_LIBRARY("${LIB_NAME}" "${SUBSYS_NAME}" ${srcs} ${incs} ${impl_incs})
- target_link_libraries("${LIB_NAME}" pcl_common ${FLANN_LIBRARIES})
+ target_link_libraries("${LIB_NAME}" pcl_common flann::flann_cpp)
set(EXT_DEPS flann)
PCL_MAKE_PKGCONFIG("${LIB_NAME}" "${SUBSYS_NAME}" "${SUBSYS_DESC}"
"${SUBSYS_DEPS}" "${EXT_DEPS}" "" "" "")
@@ -38,4 +38,3 @@ if(build)
PCL_ADD_INCLUDES("${SUBSYS_NAME}" "${SUBSYS_NAME}/impl" ${impl_incs})
endif(build)
-
diff --git a/search/CMakeLists.txt b/search/CMakeLists.txt
index cd82a0e..1d15241 100755
index 46f4632..67c5e53 100644
--- a/search/CMakeLists.txt
+++ b/search/CMakeLists.txt
@@ -38,7 +38,7 @@ if(build)
set(LIB_NAME "pcl_${SUBSYS_NAME}")
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include")
PCL_ADD_LIBRARY("${LIB_NAME}" "${SUBSYS_NAME}" ${srcs} ${incs} ${impl_incs})
- target_link_libraries("${LIB_NAME}" pcl_common ${FLANN_LIBRARIES} pcl_octree pcl_kdtree)
+ target_link_libraries("${LIB_NAME}" pcl_common flann::flann_cpp pcl_octree pcl_kdtree)
list(APPEND EXT_DEPS flann)
PCL_MAKE_PKGCONFIG("${LIB_NAME}" "${SUBSYS_NAME}" "${SUBSYS_DESC}" "${SUBSYS_DEPS}" "" "" "" "")
@@ -41,7 +41,7 @@ set(impl_incs
set(LIB_NAME "pcl_${SUBSYS_NAME}")
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include")
PCL_ADD_LIBRARY(${LIB_NAME} COMPONENT ${SUBSYS_NAME} SOURCES ${srcs} ${incs} ${impl_incs})
-target_link_libraries("${LIB_NAME}" pcl_common FLANN::FLANN pcl_octree pcl_kdtree)
+target_link_libraries("${LIB_NAME}" pcl_common flann::flann_cpp pcl_octree pcl_kdtree)
list(APPEND EXT_DEPS flann)
PCL_MAKE_PKGCONFIG(${LIB_NAME} COMPONENT ${SUBSYS_NAME} DESC ${SUBSYS_DESC} PCL_DEPS ${SUBSYS_DEPS})
@@ -46,4 +46,3 @@ if(build)
PCL_ADD_INCLUDES("${SUBSYS_NAME}" "${SUBSYS_NAME}/impl" ${impl_incs})
endif(build)
-
diff --git a/test/features/CMakeLists.txt b/test/features/CMakeLists.txt
index cedb0cb..4b37c73 100755
index 9775415..bf582ac 100644
--- a/test/features/CMakeLists.txt
+++ b/test/features/CMakeLists.txt
@@ -81,14 +81,14 @@ if (build)
PCL_ADD_TEST(feature_flare_estimation test_flare_estimation
FILES test_flare_estimation.cpp
LINK_WITH pcl_gtest pcl_features pcl_io
- ARGUMENTS "${PCL_SOURCE_DIR}/test/bun0.pcd")
+ ARGUMENTS "${PCL_SOURCE_DIR}/test/bun0.pcd")
PCL_ADD_TEST(feature_shot_lrf_estimation test_shot_lrf_estimation
FILES test_shot_lrf_estimation.cpp
LINK_WITH pcl_gtest pcl_features pcl_io
ARGUMENTS "${PCL_SOURCE_DIR}/test/bun0.pcd")
PCL_ADD_TEST(features_narf test_narf
FILES test_narf.cpp
- LINK_WITH pcl_gtest pcl_features ${FLANN_LIBRARIES})
+ LINK_WITH pcl_gtest pcl_features flann::flann_cpp)
PCL_ADD_TEST(a_ii_normals_test test_ii_normals
FILES test_ii_normals.cpp
LINK_WITH pcl_gtest pcl_io pcl_features
@@ -91,7 +91,7 @@ if(BUILD_io)
ARGUMENTS "${PCL_SOURCE_DIR}/test/bun0.pcd")
PCL_ADD_TEST(features_narf test_narf
FILES test_narf.cpp
- LINK_WITH pcl_gtest pcl_features FLANN::FLANN)
+ LINK_WITH pcl_gtest pcl_features flann::flann_cpp)
PCL_ADD_TEST(a_ii_normals_test test_ii_normals
FILES test_ii_normals.cpp
LINK_WITH pcl_gtest pcl_io pcl_features

View File

@ -1,31 +0,0 @@
diff --git a/PCLConfig.cmake.in b/PCLConfig.cmake.in
index f1c2ca5..d28cb63 100644
--- a/PCLConfig.cmake.in
+++ b/PCLConfig.cmake.in
@@ -609,7 +609,7 @@ foreach(component ${PCL_TO_FIND_COMPONENTS})
INTERFACE_INCLUDE_DIRECTORIES "${PCL_${COMPONENT}_INCLUDE_DIRS}"
INTERFACE_LINK_LIBRARIES "${PCL_${COMPONENT}_LINK_LIBRARIES}"
)
- else()
+ elseif(CMAKE_VERSION VERSION_LESS 3.11)
set_target_properties(${pcl_component}
PROPERTIES
INTERFACE_COMPILE_DEFINITIONS "${definitions}"
@@ -617,6 +617,17 @@ foreach(component ${PCL_TO_FIND_COMPONENTS})
INTERFACE_INCLUDE_DIRECTORIES "${PCL_${COMPONENT}_INCLUDE_DIRS}"
INTERFACE_LINK_LIBRARIES "${PCL_${COMPONENT}_LINK_LIBRARIES}"
)
+ else()
+ set_target_properties(${pcl_component}
+ PROPERTIES
+ INTERFACE_COMPILE_DEFINITIONS "${definitions}"
+ INTERFACE_COMPILE_OPTIONS "$<$<COMPILE_LANGUAGE:CXX>:${PCL_COMPILE_OPTIONS}>"
+ INTERFACE_INCLUDE_DIRECTORIES "${PCL_${COMPONENT}_INCLUDE_DIRS}"
+ )
+ # If possible, we use target_link_libraries to avoid problems with link-type keywords,
+ # see https://github.com/PointCloudLibrary/pcl/issues/2989
+ # target_link_libraries on imported libraries is supported only since CMake 3.11
+ target_link_libraries(${pcl_component} INTERFACE ${PCL_${COMPONENT}_LINK_LIBRARIES})
endif()
set(PCL_${COMPONENT}_LIBRARIES ${pcl_component})
endif()