diff options
| author | Silvio Traversaro <silvio.traversaro@iit.it> | 2019-09-12 19:06:11 +0200 |
|---|---|---|
| committer | Curtis J Bezault <curtbezault@gmail.com> | 2019-09-12 10:06:11 -0700 |
| commit | ecfc714b9adbdf8bf6b394dd6b46d9c56ca993ea (patch) | |
| tree | 6d8b34b5a64c535ef6d0c8fe5eeb16c00dc2cc22 | |
| parent | 98c188c3477065b152479a017690e43f1e84ba3f (diff) | |
| download | vcpkg-ecfc714b9adbdf8bf6b394dd6b46d9c56ca993ea.tar.gz vcpkg-ecfc714b9adbdf8bf6b394dd6b46d9c56ca993ea.zip | |
[pcl] Fix problem with link-type keywords in linked libraries (#8154)
Fix https://github.com/microsoft/vcpkg/issues/7660
| -rw-r--r-- | ports/pcl/CONTROL | 2 | ||||
| -rw-r--r-- | ports/pcl/portfile.cmake | 2 | ||||
| -rw-r--r-- | ports/pcl/use_target_link_libraries_in_pclconfig.patch | 31 |
3 files changed, 34 insertions, 1 deletions
diff --git a/ports/pcl/CONTROL b/ports/pcl/CONTROL index 7d9e3a8db..631aeebe0 100644 --- a/ports/pcl/CONTROL +++ b/ports/pcl/CONTROL @@ -1,5 +1,5 @@ Source: pcl -Version: 1.9.1-8 +Version: 1.9.1-9 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 diff --git a/ports/pcl/portfile.cmake b/ports/pcl/portfile.cmake index aa4435dd5..b0dcd3ff9 100644 --- a/ports/pcl/portfile.cmake +++ b/ports/pcl/portfile.cmake @@ -12,6 +12,8 @@ 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 ) file(REMOVE ${SOURCE_PATH}/cmake/Modules/FindFLANN.cmake) diff --git a/ports/pcl/use_target_link_libraries_in_pclconfig.patch b/ports/pcl/use_target_link_libraries_in_pclconfig.patch new file mode 100644 index 000000000..65f622e6f --- /dev/null +++ b/ports/pcl/use_target_link_libraries_in_pclconfig.patch @@ -0,0 +1,31 @@ +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()
|
