From e9f8dbf440ff65b9a6ce942f46f65c19c02d9fb9 Mon Sep 17 00:00:00 2001 From: JackBoosY <47264268+JackBoosY@users.noreply.github.com> Date: Thu, 1 Aug 2019 19:39:10 +0800 Subject: [pcl]Fix Build failure in linux (#7413) * [pcl]Set opengl as a port feature. * [pcl]Re-generate boost patch. * [pcl]Use vcpkg_check_features. --- ports/pcl/CONTROL | 5 ++++- ports/pcl/boost-1.70.patch | 14 ++++++++++++++ ports/pcl/portfile.cmake | 33 +++++++++------------------------ 3 files changed, 27 insertions(+), 25 deletions(-) diff --git a/ports/pcl/CONTROL b/ports/pcl/CONTROL index 41714a66a..1cf828db4 100644 --- a/ports/pcl/CONTROL +++ b/ports/pcl/CONTROL @@ -1,5 +1,5 @@ Source: pcl -Version: 1.9.1-5 +Version: 1.9.1-6 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 @@ -23,3 +23,6 @@ Build-Depends: boost-accumulators Feature: cuda Description: CUDA support for PCL Build-Depends: cuda + +Feature: opengl +Description: OpenGL support for PCL diff --git a/ports/pcl/boost-1.70.patch b/ports/pcl/boost-1.70.patch index 1c8a02121..c4b9955d2 100644 --- a/ports/pcl/boost-1.70.patch +++ b/ports/pcl/boost-1.70.patch @@ -11,3 +11,17 @@ index 05e6002..99e3a07 100644 typedef boost::ptr_list 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/ports/pcl/portfile.cmake b/ports/pcl/portfile.cmake index b855831e9..6ef083351 100644 --- a/ports/pcl/portfile.cmake +++ b/ports/pcl/portfile.cmake @@ -18,30 +18,14 @@ file(REMOVE ${SOURCE_PATH}/cmake/Modules/FindFLANN.cmake) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" PCL_SHARED_LIBS) -set(WITH_OPENNI2 OFF) -if("openni2" IN_LIST FEATURES) - set(WITH_OPENNI2 ON) -endif() - -set(WITH_QT OFF) -if("qt" IN_LIST FEATURES) - set(WITH_QT ON) -endif() - -set(WITH_PCAP OFF) -if("pcap" IN_LIST FEATURES) - set(WITH_PCAP ON) -endif() - -set(WITH_CUDA OFF) -if("cuda" IN_LIST FEATURES) - set(WITH_CUDA ON) -endif() - -set(BUILD_TOOLS OFF) -if("tools" IN_LIST FEATURES) - set(BUILD_TOOLS ON) -endif() +vcpkg_check_features( + openni2 WITH_OPENNI2 + qt WITH_QT + pcap WITH_PCAP + cuda WITH_CUDA + tools BUILD_TOOLS + opengl WITH_OPENGL +) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} @@ -66,6 +50,7 @@ vcpkg_configure_cmake( -DWITH_QHULL=ON -DWITH_QT=${WITH_QT} -DWITH_VTK=ON + -DWITH_OPENGL=${WITH_OPENGL} ) vcpkg_install_cmake() -- cgit v1.2.3