diff options
| author | Stefano Sinigardi <stesinigardi@hotmail.com> | 2019-05-19 07:58:03 +0200 |
|---|---|---|
| committer | Victor Romero <romerosanchezv@gmail.com> | 2019-05-18 22:58:03 -0700 |
| commit | 69e86fd2013e0c495cc4e61500e794548b62ae03 (patch) | |
| tree | 622efdfd61d25e6105751e316b033e8ff4bcd804 /ports/pcl | |
| parent | 77af264118522788e24e463309220f97dcff0a79 (diff) | |
| download | vcpkg-69e86fd2013e0c495cc4e61500e794548b62ae03.tar.gz vcpkg-69e86fd2013e0c495cc4e61500e794548b62ae03.zip | |
[lz4, flann] port patches from #5169 (#6294)
* [lz4, flann] port patches from #5169
* [lz4] use vcpkg_fixup_cmake_targets
* [flann] improve target handling
* [lz4] remove unnecessary debug message
* [openmvg] many many fixes to build it on windows
* [pcl] use official FLANN cmake config file instead of custom module
* [pcl] fix patch for flann targets
* [pcl] Bump CONTROL version
Diffstat (limited to 'ports/pcl')
| -rw-r--r-- | ports/pcl/CONTROL | 2 | ||||
| -rw-r--r-- | ports/pcl/find_flann.patch | 15 | ||||
| -rw-r--r-- | ports/pcl/portfile.cmake | 11 | ||||
| -rw-r--r-- | ports/pcl/use_flann_targets.patch | 155 |
4 files changed, 163 insertions, 20 deletions
diff --git a/ports/pcl/CONTROL b/ports/pcl/CONTROL index 0c28ee654..3e3884c48 100644 --- a/ports/pcl/CONTROL +++ b/ports/pcl/CONTROL @@ -1,5 +1,5 @@ Source: pcl -Version: 1.9.1-2 +Version: 1.9.1-3 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 diff --git a/ports/pcl/find_flann.patch b/ports/pcl/find_flann.patch deleted file mode 100644 index 263be2926..000000000 --- a/ports/pcl/find_flann.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/cmake/Modules/FindFLANN.cmake b/cmake/Modules/FindFLANN.cmake -index 1cecacfa9..3169d6d7b 100644 ---- a/cmake/Modules/FindFLANN.cmake -+++ b/cmake/Modules/FindFLANN.cmake -@@ -10,8 +10,8 @@ - # look for shared ones - - if(FLANN_USE_STATIC) -- set(FLANN_RELEASE_NAME flann_cpp_s) -- set(FLANN_DEBUG_NAME flann_cpp_s-gd) -+ set(FLANN_RELEASE_NAME flann_cpp) -+ set(FLANN_DEBUG_NAME flann_cpp-gd) - else(FLANN_USE_STATIC) - set(FLANN_RELEASE_NAME flann_cpp) - set(FLANN_DEBUG_NAME flann_cpp-gd) diff --git a/ports/pcl/portfile.cmake b/ports/pcl/portfile.cmake index a8947938f..971abe025 100644 --- a/ports/pcl/portfile.cmake +++ b/ports/pcl/portfile.cmake @@ -6,12 +6,15 @@ vcpkg_from_github( REF pcl-1.9.1 SHA512 ca95028c23861ac2df0fa7e18fdd0202255cb2e49ab714325eb36c35289442c6eedbf489e6f9f232b30fa2a93eff4c9619f8a14d3fdfe58f353a4a6e26206bdf HEAD_REF master - PATCHES pcl_utils.patch - pcl_config.patch - find_flann.patch - boost-1.70.patch + PATCHES + pcl_utils.patch + pcl_config.patch + use_flann_targets.patch + boost-1.70.patch ) +file(REMOVE ${SOURCE_PATH}/cmake/Modules/FindFLANN.cmake) + string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" PCL_SHARED_LIBS) set(WITH_OPENNI2 OFF) diff --git a/ports/pcl/use_flann_targets.patch b/ports/pcl/use_flann_targets.patch new file mode 100644 index 000000000..7e6289267 --- /dev/null +++ b/ports/pcl/use_flann_targets.patch @@ -0,0 +1,155 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 0b4c1a3..94bb484 100755 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -280,11 +280,9 @@ find_package(Eigen REQUIRED) + include_directories(SYSTEM ${EIGEN_INCLUDE_DIRS}) + + # FLANN (required) +-if(NOT PCL_SHARED_LIBS OR ((WIN32 AND NOT MINGW) AND NOT PCL_BUILD_WITH_FLANN_DYNAMIC_LINKING_WIN32)) +- set(FLANN_USE_STATIC ON) +-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 +--- a/PCLConfig.cmake.in ++++ b/PCLConfig.cmake.in +@@ -226,12 +226,6 @@ endmacro(find_rssdk) + + #remove this as soon as flann is shipped with FindFlann.cmake + macro(find_flann) +- 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) + + # 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}) + + 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 +--- 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) + +-# we need FindFLANN.cmake ++# we need FindFLANN.cmake + list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}) + + 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) +diff --git a/kdtree/CMakeLists.txt b/kdtree/CMakeLists.txt +index 311dffc..1a7712f 100755 +--- 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}") + + 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 +--- 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}" "" "" "" "") + +@@ -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 +--- 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 |
