From 772437c762c2588907bab9239dd254f0ce58dfed Mon Sep 17 00:00:00 2001 From: JackBoosY Date: Wed, 1 Dec 2021 00:49:09 -0800 Subject: [PATCH 1/8] [pcl] Add feature apps, visualization and examples --- ports/pcl/portfile.cmake | 23 +++++++++++++---------- ports/pcl/vcpkg.json | 34 +++++++++++++++++++++++++++++++++- 2 files changed, 46 insertions(+), 11 deletions(-) diff --git a/ports/pcl/portfile.cmake b/ports/pcl/portfile.cmake index 5780a8b10870a2..fc4150c82d576f 100644 --- a/ports/pcl/portfile.cmake +++ b/ports/pcl/portfile.cmake @@ -32,16 +32,19 @@ 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 ) vcpkg_cmake_configure( diff --git a/ports/pcl/vcpkg.json b/ports/pcl/vcpkg.json index f5db2beb7ffd12..ad2891971f7a06 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,32 @@ } ], "features": { + "apps": { + "description": "Build application examples/samples that show how PCL works", + "dependencies": [ + { + "name": "pcl", + "default-features": false, + "features": [ + "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": [ @@ -96,6 +116,18 @@ "boost-accumulators" ] }, + "visualization": { + "description": "Build visualization", + "dependencies": [ + { + "name": "pcl", + "default-features": false, + "features": [ + "vtk" + ] + } + ] + }, "vtk": { "description": "VTK-Visualizations support for PCL", "dependencies": [ From df6f16b873173e74259696d091b988d8e9bb9885 Mon Sep 17 00:00:00 2001 From: JackBoosY Date: Wed, 1 Dec 2021 01:40:37 -0800 Subject: [PATCH 2/8] version --- versions/baseline.json | 2 +- versions/p-/pcl.json | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) 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..7c3e2789645f02 100644 --- a/versions/p-/pcl.json +++ b/versions/p-/pcl.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "0e7d2fa0146bc28447830bfddd62c601ec50b6f9", + "version": "1.12.0", + "port-version": 2 + }, { "git-tree": "a2eb47fa4d7f959d9c8712f0d0925c2af94bcc80", "version": "1.12.0", From 294b6cedfdce62751ad34f60227558844ec90502 Mon Sep 17 00:00:00 2001 From: JackBoosY Date: Wed, 1 Dec 2021 02:00:33 -0800 Subject: [PATCH 3/8] Add simulation --- ports/pcl/portfile.cmake | 3 ++- ports/pcl/vcpkg.json | 13 +++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/ports/pcl/portfile.cmake b/ports/pcl/portfile.cmake index fc4150c82d576f..cdd894878984c0 100644 --- a/ports/pcl/portfile.cmake +++ b/ports/pcl/portfile.cmake @@ -45,6 +45,7 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS visualization BUILD_visualization examples BUILD_examples apps BUILD_apps + simulation BUILD_simulation ) vcpkg_cmake_configure( @@ -106,7 +107,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) 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") diff --git a/ports/pcl/vcpkg.json b/ports/pcl/vcpkg.json index ad2891971f7a06..02616858c011b5 100644 --- a/ports/pcl/vcpkg.json +++ b/ports/pcl/vcpkg.json @@ -110,6 +110,19 @@ } ] }, + "simulation": { + "description": "Build Point Cloud Library Simulation", + "dependencies": [ + "glew", + { + "name": "pcl", + "default-features": false, + "features": [ + "opengl" + ] + } + ] + }, "tools": { "description": "Build PCL utilities", "dependencies": [ From d78ba10d8bbc4b469c8ed3121635c45fe57b354c Mon Sep 17 00:00:00 2001 From: JackBoosY Date: Thu, 2 Dec 2021 00:11:55 -0800 Subject: [PATCH 4/8] Enable more apps, install examples, add usage --- ports/pcl/install-examples.patch | 13 +++++++++++++ ports/pcl/portfile.cmake | 10 +++++++++- ports/pcl/usage | 4 ++++ ports/pcl/vcpkg.json | 3 ++- 4 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 ports/pcl/install-examples.patch create mode 100644 ports/pcl/usage 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 cdd894878984c0..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" @@ -45,6 +46,12 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS 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 ) @@ -107,7 +114,7 @@ vcpkg_fixup_pkgconfig() file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") -if(BUILD_tools) +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") @@ -115,4 +122,5 @@ if(BUILD_tools) 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 02616858c011b5..2a740c649e6529 100644 --- a/ports/pcl/vcpkg.json +++ b/ports/pcl/vcpkg.json @@ -46,7 +46,8 @@ "features": [ "openni2", "qt", - "vtk" + "vtk", + "opengl" ] } ] From 6ce252f535d936304caf0403d632f6ad399b99ed Mon Sep 17 00:00:00 2001 From: JackBoosY Date: Thu, 2 Dec 2021 00:13:03 -0800 Subject: [PATCH 5/8] format manifest file --- ports/pcl/vcpkg.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/pcl/vcpkg.json b/ports/pcl/vcpkg.json index 2a740c649e6529..9fbcc3524643cf 100644 --- a/ports/pcl/vcpkg.json +++ b/ports/pcl/vcpkg.json @@ -44,10 +44,10 @@ "name": "pcl", "default-features": false, "features": [ + "opengl", "openni2", "qt", - "vtk", - "opengl" + "vtk" ] } ] From 653518e7510f1b66fcb1559ca134bea027cdf131 Mon Sep 17 00:00:00 2001 From: JackBoosY Date: Thu, 2 Dec 2021 00:13:15 -0800 Subject: [PATCH 6/8] version --- versions/p-/pcl.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/p-/pcl.json b/versions/p-/pcl.json index 7c3e2789645f02..36c51a71ea242a 100644 --- a/versions/p-/pcl.json +++ b/versions/p-/pcl.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "0e7d2fa0146bc28447830bfddd62c601ec50b6f9", + "git-tree": "f6468cc37e35e4726ef3ad86628bfc73818bca55", "version": "1.12.0", "port-version": 2 }, From 0032e2c063803c11ed388fd14acd163c59d54ff6 Mon Sep 17 00:00:00 2001 From: JackBoosY Date: Thu, 16 Dec 2021 21:53:23 -0800 Subject: [PATCH 7/8] set feature vtk as a alias for feature visualization --- ports/pcl/vcpkg.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/ports/pcl/vcpkg.json b/ports/pcl/vcpkg.json index 9fbcc3524643cf..f50381e733d5ae 100644 --- a/ports/pcl/vcpkg.json +++ b/ports/pcl/vcpkg.json @@ -132,21 +132,21 @@ }, "visualization": { "description": "Build visualization", + "dependencies": [ + "vtk" + ] + }, + "vtk": { + "description": "An alias for visualization", "dependencies": [ { "name": "pcl", "default-features": false, "features": [ - "vtk" + "visualization" ] } ] - }, - "vtk": { - "description": "VTK-Visualizations support for PCL", - "dependencies": [ - "vtk" - ] } } } From 5100ce202837e8b7afab34a5bc639900e2c08cf0 Mon Sep 17 00:00:00 2001 From: JackBoosY Date: Thu, 16 Dec 2021 21:54:33 -0800 Subject: [PATCH 8/8] version --- versions/p-/pcl.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/p-/pcl.json b/versions/p-/pcl.json index 36c51a71ea242a..71cc6775476132 100644 --- a/versions/p-/pcl.json +++ b/versions/p-/pcl.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "f6468cc37e35e4726ef3ad86628bfc73818bca55", + "git-tree": "5d02740fc9422f1b520ae322cda71e8e6e5323cf", "version": "1.12.0", "port-version": 2 },