diff --git a/ports/pcl/install-examples.patch b/ports/pcl/install-examples.patch new file mode 100644 index 00000000000000..136a4ce3675c1e --- /dev/null +++ b/ports/pcl/install-examples.patch @@ -0,0 +1,13 @@ +diff --git a/cmake/pcl_targets.cmake b/cmake/pcl_targets.cmake +index 91f2404..18f5a24 100644 +--- a/cmake/pcl_targets.cmake ++++ b/cmake/pcl_targets.cmake +@@ -473,6 +473,8 @@ macro(PCL_ADD_EXAMPLE _name) + # add target to list of example targets created at the parent scope + list(APPEND PCL_EXAMPLES_ALL_TARGETS ${_name}) + set(PCL_EXAMPLES_ALL_TARGETS "${PCL_EXAMPLES_ALL_TARGETS}" PARENT_SCOPE) ++ ++ install(TARGETS ${_name} RUNTIME DESTINATION ${BIN_INSTALL_DIR}) + endmacro() + + ############################################################################### diff --git a/ports/pcl/portfile.cmake b/ports/pcl/portfile.cmake index 5780a8b10870a2..cb11edf143065a 100644 --- a/ports/pcl/portfile.cmake +++ b/ports/pcl/portfile.cmake @@ -15,6 +15,7 @@ vcpkg_from_github( fix-cmake_find_library_suffixes.patch fix-pkgconfig.patch # Remove this patch in the next update fix-find-libusb.patch + install-examples.patch ) file(REMOVE "${SOURCE_PATH}/cmake/Modules/FindQhull.cmake" @@ -32,16 +33,26 @@ endif() vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS FEATURES - openni2 WITH_OPENNI2 - qt WITH_QT - pcap WITH_PCAP - cuda WITH_CUDA - cuda BUILD_CUDA - cuda BUILD_GPU - tools BUILD_tools - opengl WITH_OPENGL - vtk WITH_VTK - libusb WITH_LIBUSB + openni2 WITH_OPENNI2 + qt WITH_QT + pcap WITH_PCAP + cuda WITH_CUDA + cuda BUILD_CUDA + cuda BUILD_GPU + tools BUILD_tools + opengl WITH_OPENGL + vtk WITH_VTK + libusb WITH_LIBUSB + visualization BUILD_visualization + examples BUILD_examples + apps BUILD_apps + apps BUILD_apps_cloud_composer + apps BUILD_apps_modeler + apps BUILD_apps_point_cloud_editor + # These 2 apps need openni1 + #apps BUILD_apps_in_hand_scanner + #apps BUILD_apps_3d_rec_framework + simulation BUILD_simulation ) vcpkg_cmake_configure( @@ -103,7 +114,7 @@ vcpkg_fixup_pkgconfig() file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") -if("tools" IN_LIST FEATURES) +if(BUILD_tools OR BUILD_apps OR BUILD_examples) file(GLOB EXEFILES_RELEASE "${CURRENT_PACKAGES_DIR}/bin/*${VCPKG_TARGET_EXECUTABLE_SUFFIX}") file(GLOB EXEFILES_DEBUG "${CURRENT_PACKAGES_DIR}/debug/bin/*${VCPKG_TARGET_EXECUTABLE_SUFFIX}") file(COPY ${EXEFILES_RELEASE} DESTINATION "${CURRENT_PACKAGES_DIR}/tools/pcl") @@ -111,4 +122,5 @@ if("tools" IN_LIST FEATURES) vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/pcl") endif() +file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/pcl/usage b/ports/pcl/usage new file mode 100644 index 00000000000000..60aecd4943902f --- /dev/null +++ b/ports/pcl/usage @@ -0,0 +1,4 @@ +The package pcl provides CMake targets: + + find_package(PCL CONFIG REQUIRED) + target_link_libraries(main PRIVATE ${PCL_LIBRARIES}) diff --git a/ports/pcl/vcpkg.json b/ports/pcl/vcpkg.json index f5db2beb7ffd12..f50381e733d5ae 100644 --- a/ports/pcl/vcpkg.json +++ b/ports/pcl/vcpkg.json @@ -1,7 +1,7 @@ { "name": "pcl", "version": "1.12.0", - "port-version": 1, + "port-version": 2, "description": "Point Cloud Library (PCL) is open source library for 2D/3D image and point cloud processing.", "homepage": "https://github.com/PointCloudLibrary/pcl", "supports": "!(arm64 & windows)", @@ -37,12 +37,33 @@ } ], "features": { + "apps": { + "description": "Build application examples/samples that show how PCL works", + "dependencies": [ + { + "name": "pcl", + "default-features": false, + "features": [ + "opengl", + "openni2", + "qt", + "vtk" + ] + } + ] + }, "cuda": { "description": "CUDA support for PCL", "dependencies": [ "cuda" ] }, + "examples": { + "description": "Build PCL examples", + "dependencies": [ + "vtk" + ] + }, "libusb": { "description": "Build USB RGBD-Camera drivers", "dependencies": [ @@ -90,17 +111,42 @@ } ] }, + "simulation": { + "description": "Build Point Cloud Library Simulation", + "dependencies": [ + "glew", + { + "name": "pcl", + "default-features": false, + "features": [ + "opengl" + ] + } + ] + }, "tools": { "description": "Build PCL utilities", "dependencies": [ "boost-accumulators" ] }, - "vtk": { - "description": "VTK-Visualizations support for PCL", + "visualization": { + "description": "Build visualization", "dependencies": [ "vtk" ] + }, + "vtk": { + "description": "An alias for visualization", + "dependencies": [ + { + "name": "pcl", + "default-features": false, + "features": [ + "visualization" + ] + } + ] } } } diff --git a/versions/baseline.json b/versions/baseline.json index eff736117e3fc3..62494f41412133 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -5170,7 +5170,7 @@ }, "pcl": { "baseline": "1.12.0", - "port-version": 1 + "port-version": 2 }, "pcre": { "baseline": "8.45", diff --git a/versions/p-/pcl.json b/versions/p-/pcl.json index 609b71c7d53b24..71cc6775476132 100644 --- a/versions/p-/pcl.json +++ b/versions/p-/pcl.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "5d02740fc9422f1b520ae322cda71e8e6e5323cf", + "version": "1.12.0", + "port-version": 2 + }, { "git-tree": "a2eb47fa4d7f959d9c8712f0d0925c2af94bcc80", "version": "1.12.0",