[pcl] Fix link to libpng (#11047)

* [pcl] Fix link to libpng

* [pcl] Format code
This commit is contained in:
Jack·Boos·Yu 2020-05-01 00:49:07 +08:00 committed by GitHub
parent 3ae3bd3445
commit a9640a5422
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 24 additions and 3 deletions

View File

@ -1,5 +1,5 @@
Source: pcl
Version: 1.9.1-11
Version: 1.9.1-12
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

View File

@ -0,0 +1,20 @@
diff --git a/io/CMakeLists.txt b/io/CMakeLists.txt
index a17cb2d..b2a56b3 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} )
if(LIBUSB_1_FOUND)
target_link_libraries("${LIB_NAME}" ${LIBUSB_1_LIBRARIES})

View File

@ -10,8 +10,9 @@ vcpkg_from_github(
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
# Patch for https://github.com/microsoft/vcpkg/issues/7660
use_target_link_libraries_in_pclconfig.patch
fix-link-libpng.patch
)
file(REMOVE ${SOURCE_PATH}/cmake/Modules/FindFLANN.cmake)