2017-07-05 23:30:18 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO PointCloudLibrary/pcl
|
2023-07-20 05:15:10 +08:00
|
|
|
REF "pcl-${VERSION}"
|
[pcl] update to version 1.14.1 (#38553)
<!-- If your PR fixes issues, please note that here by adding "Fixes
#NNNNNN." for each fixed issue on separate lines. -->
<!-- If you are still working on the PR, open it as a Draft:
https://github.blog/2019-02-14-introducing-draft-pull-requests/. -->
- [x] Changes comply with the [maintainer
guide](https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/contributing/maintainer-guide.md).
- [x] SHA512s are updated for each updated download.
- [ ] ~~The "supports" clause reflects platforms that may be fixed by
this new version.~~
- [ ] ~~Any fixed [CI
baseline](https://github.com/microsoft/vcpkg/blob/master/scripts/ci.baseline.txt)
entries are removed from that file.~~
- [x] Any patches that are no longer applied are deleted from the port's
directory.
- [x] The version database is fixed by rerunning `./vcpkg x-add-version
--all` and committing the result.
- [x] Only one version is added to each modified port's versions file.
Updated io_ply.patch so that it applies cleanly.
Additionally, the setting `-DWITH_OPENMP=OFF` is removed because there
does not seem to be a specific reason for it, and in my tests PCL still
built fine if it was removed, see
https://github.com/microsoft/vcpkg/pull/21276#issuecomment-2044492937
<!-- If this PR adds a new port, please uncomment and fill out this
checklist:
- [ ] Changes comply with the [maintainer
guide](https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/contributing/maintainer-guide.md).
- [ ] The name of the port matches an existing name for this component
on https://repology.org/ if possible, and/or is strongly associated with
that component on search engines.
- [ ] Optional dependencies are resolved in exactly one way. For
example, if the component is built with CMake, all `find_package` calls
are REQUIRED, are satisfied by `vcpkg.json`'s declared dependencies, or
disabled with
[CMAKE_DISABLE_FIND_PACKAGE_Xxx](https://cmake.org/cmake/help/latest/variable/CMAKE_DISABLE_FIND_PACKAGE_PackageName.html).
- [ ] The versioning scheme in `vcpkg.json` matches what upstream says.
- [ ] The license declaration in `vcpkg.json` matches what upstream
says.
- [ ] The installed as the "copyright" file matches what upstream says.
- [ ] The source code of the component installed comes from an
authoritative source.
- [ ] The generated "usage text" is accurate. See
[adding-usage](https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/examples/adding-usage.md)
for context.
- [ ] The version database is fixed by rerunning `./vcpkg x-add-version
--all` and committing the result.
- [ ] Only one version is in the new port's versions file.
- [ ] Only one version is added to each modified port's versions file.
END OF NEW PORT CHECKLIST (delete this line) -->
2024-05-04 06:29:44 +08:00
|
|
|
SHA512 8e2d2839fe73a955d49b9a72861de2becf2da9a0dc906bd10ab8a3518e270a2f1900d801922d02871d704f2ed380273d35c2d0e04d8da7e24a21eb351c43c00b
|
2017-07-05 23:30:18 +08:00
|
|
|
HEAD_REF master
|
2019-05-19 13:58:03 +08:00
|
|
|
PATCHES
|
2021-02-05 05:35:20 +08:00
|
|
|
add-gcc-version-check.patch
|
2021-11-05 15:24:45 +08:00
|
|
|
fix-check-sse.patch
|
|
|
|
fix-numeric-literals-flag.patch
|
2024-03-29 04:21:54 +08:00
|
|
|
install-layout.patch
|
2021-12-18 01:07:21 +08:00
|
|
|
install-examples.patch
|
2023-12-15 14:58:19 +08:00
|
|
|
fix-clang-cl.patch
|
2024-03-29 04:21:54 +08:00
|
|
|
gh-5985-inline.patch
|
|
|
|
io_ply.patch
|
2024-10-19 04:59:30 +08:00
|
|
|
6053.diff # https://github.com/PointCloudLibrary/pcl/pull/6053
|
|
|
|
6990a3b0d7dd3c1ca04a1a473cc172a937418060.diff # https://github.com/PointCloudLibrary/pcl/pull/6105
|
2024-10-29 17:32:19 +08:00
|
|
|
0012-msvc-optimizer-workaround.patch # backport pcl #6143 and #6154
|
2017-06-15 06:46:30 +08:00
|
|
|
)
|
|
|
|
|
2017-11-10 16:31:46 +08:00
|
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" PCL_SHARED_LIBS)
|
2017-06-15 06:46:30 +08:00
|
|
|
|
2019-08-14 11:13:55 +08:00
|
|
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
2021-04-29 08:38:32 +08:00
|
|
|
FEATURES
|
2023-04-25 06:31:10 +08:00
|
|
|
apps BUILD_apps
|
2021-12-18 01:07:21 +08:00
|
|
|
cuda WITH_CUDA
|
|
|
|
cuda BUILD_CUDA
|
|
|
|
cuda BUILD_GPU
|
2023-04-25 06:31:10 +08:00
|
|
|
examples BUILD_examples
|
2021-12-18 01:07:21 +08:00
|
|
|
libusb WITH_LIBUSB
|
2023-04-25 06:31:10 +08:00
|
|
|
opengl WITH_OPENGL
|
|
|
|
openni2 WITH_OPENNI2
|
|
|
|
pcap WITH_PCAP
|
|
|
|
qt WITH_QT
|
|
|
|
simulation BUILD_simulation
|
|
|
|
surface-on-nurbs BUILD_surface_on_nurbs
|
|
|
|
tools BUILD_tools
|
2022-02-10 11:29:02 +08:00
|
|
|
visualization WITH_VTK
|
2021-12-18 01:07:21 +08:00
|
|
|
visualization BUILD_visualization
|
|
|
|
# These 2 apps need openni1
|
|
|
|
#apps BUILD_apps_in_hand_scanner
|
|
|
|
#apps BUILD_apps_3d_rec_framework
|
2019-08-01 19:39:10 +08:00
|
|
|
)
|
2018-03-02 02:45:41 +08:00
|
|
|
|
2021-11-05 15:24:45 +08:00
|
|
|
vcpkg_cmake_configure(
|
2021-11-23 06:28:36 +08:00
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2017-06-15 06:46:30 +08:00
|
|
|
OPTIONS
|
|
|
|
# PCL
|
2023-04-25 06:31:10 +08:00
|
|
|
-DPCL_ALLOW_BOTH_SHARED_AND_STATIC_DEPENDENCIES=ON
|
2017-11-10 16:31:46 +08:00
|
|
|
-DPCL_BUILD_WITH_BOOST_DYNAMIC_LINKING_WIN32=${PCL_SHARED_LIBS}
|
|
|
|
-DPCL_BUILD_WITH_FLANN_DYNAMIC_LINKING_WIN32=${PCL_SHARED_LIBS}
|
2018-10-16 18:44:01 +08:00
|
|
|
-DPCL_BUILD_WITH_QHULL_DYNAMIC_LINKING_WIN32=${PCL_SHARED_LIBS}
|
2017-11-10 16:31:46 +08:00
|
|
|
-DPCL_SHARED_LIBS=${PCL_SHARED_LIBS}
|
2023-07-20 05:15:10 +08:00
|
|
|
-DPCL_ENABLE_MARCHNATIVE=OFF
|
2017-06-15 06:46:30 +08:00
|
|
|
# WITH
|
2021-11-23 06:28:36 +08:00
|
|
|
-DWITH_DAVIDSDK=OFF
|
2023-04-25 06:31:10 +08:00
|
|
|
-DWITH_DOCS=OFF
|
2021-11-23 06:28:36 +08:00
|
|
|
-DWITH_DSSDK=OFF
|
2023-04-25 06:31:10 +08:00
|
|
|
-DWITH_ENSENSO=OFF
|
|
|
|
-DWITH_OPENNI=OFF
|
|
|
|
-DWITH_PNG=ON
|
|
|
|
-DWITH_QHULL=ON
|
2021-11-23 06:28:36 +08:00
|
|
|
-DWITH_RSSDK=OFF
|
|
|
|
-DWITH_RSSDK2=OFF
|
2019-08-14 11:13:55 +08:00
|
|
|
# FEATURES
|
|
|
|
${FEATURE_OPTIONS}
|
2023-04-25 06:31:10 +08:00
|
|
|
OPTIONS_DEBUG
|
|
|
|
-DBUILD_apps=OFF
|
|
|
|
-DBUILD_examples=OFF
|
|
|
|
-DBUILD_tools=OFF
|
2021-11-23 06:28:36 +08:00
|
|
|
MAYBE_UNUSED_VARIABLES
|
|
|
|
PCL_BUILD_WITH_FLANN_DYNAMIC_LINKING_WIN32
|
2023-01-31 08:41:37 +08:00
|
|
|
PCL_BUILD_WITH_QHULL_DYNAMIC_LINKING_WIN32
|
2017-06-15 06:46:30 +08:00
|
|
|
)
|
|
|
|
|
2024-03-29 04:21:54 +08:00
|
|
|
if(NOT EXISTS "${CURRENT_INSTALLED_DIR}/lib/pkgconfig/vtk.pc")
|
|
|
|
file(REMOVE "${CURRENT_PACKAGE_DIR}/lib/pkgconfig/pcl_gpu_kinfu_large_scale.pc" "${CURRENT_PACKAGE_DIR}/debug/lib/pkgconfig/pcl_gpu_kinfu_large_scale.pc")
|
|
|
|
endif()
|
|
|
|
|
2021-11-05 15:24:45 +08:00
|
|
|
vcpkg_cmake_install()
|
|
|
|
vcpkg_cmake_config_fixup()
|
2017-11-10 16:31:46 +08:00
|
|
|
vcpkg_copy_pdbs()
|
2017-06-15 06:46:30 +08:00
|
|
|
|
2021-11-23 06:28:36 +08:00
|
|
|
if (WITH_OPENNI2)
|
|
|
|
if (NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
|
|
|
|
file(GLOB PCL_PKGCONFIG_DBGS "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/*.pc")
|
|
|
|
foreach (PCL_PKGCONFIG IN LISTS PCL_PKGCONFIG_DBGS)
|
|
|
|
file(READ "${PCL_PKGCONFIG}" PCL_PC_DBG)
|
|
|
|
if (PCL_PC_DBG MATCHES "libopenni2")
|
|
|
|
string(REPLACE "libopenni2" "" PCL_PC_DBG "${PCL_PC_DBG}")
|
|
|
|
string(REPLACE "Libs: " "Libs: -lKinect10 -lOpenNI2 " PCL_PC_DBG "${PCL_PC_DBG}")
|
|
|
|
file(WRITE "${PCL_PKGCONFIG}" "${PCL_PC_DBG}")
|
|
|
|
endif()
|
|
|
|
endforeach()
|
|
|
|
endif()
|
|
|
|
if (NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
|
|
|
|
file(GLOB PCL_PKGCONFIG_RELS "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/*.pc")
|
|
|
|
foreach (PCL_PKGCONFIG IN LISTS PCL_PKGCONFIG_RELS)
|
|
|
|
file(READ "${PCL_PKGCONFIG}" PCL_PC_REL)
|
|
|
|
if (PCL_PC_REL MATCHES "libopenni2")
|
|
|
|
string(REPLACE "libopenni2" "" PCL_PC_REL "${PCL_PC_REL}")
|
|
|
|
string(REPLACE "Libs: " "Libs: -lKinect10 -lOpenNI2 " PCL_PC_REL "${PCL_PC_REL}")
|
|
|
|
file(WRITE "${PCL_PKGCONFIG}" "${PCL_PC_REL}")
|
|
|
|
endif()
|
|
|
|
endforeach()
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
vcpkg_fixup_pkgconfig()
|
|
|
|
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
2017-11-10 16:31:46 +08:00
|
|
|
|
2021-12-18 01:07:21 +08:00
|
|
|
if(BUILD_tools OR BUILD_apps OR BUILD_examples)
|
2023-04-25 06:31:10 +08:00
|
|
|
file(GLOB tool_names
|
|
|
|
LIST_DIRECTORIES false
|
|
|
|
RELATIVE "${CURRENT_PACKAGES_DIR}/bin"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/bin/*${VCPKG_TARGET_EXECUTABLE_SUFFIX}"
|
|
|
|
)
|
|
|
|
if(VCPKG_TARGET_EXECUTABLE_SUFFIX)
|
|
|
|
string(REPLACE "." "[.]" suffix "${VCPKG_TARGET_EXECUTABLE_SUFFIX}")
|
|
|
|
list(TRANSFORM tool_names REPLACE "${suffix}\$" "")
|
|
|
|
endif()
|
|
|
|
vcpkg_copy_tools(TOOL_NAMES ${tool_names} AUTO_CLEAN)
|
2018-03-02 02:45:41 +08:00
|
|
|
endif()
|
|
|
|
|
2023-09-06 13:43:22 +08:00
|
|
|
# pcl_apps.dll is only build for release but not used at all since BUILD_apps_3d_rec_framework is OFF.
|
|
|
|
# Because it is not copied to the tool folder and there is no debug variant, we get an post build check error.
|
|
|
|
# Since the lib is not needed. Delete it:
|
|
|
|
file(REMOVE "${CURRENT_PACKAGES_DIR}/bin/pcl_apps.dll" "${CURRENT_PACKAGES_DIR}/bin/pcl_apps.pdb"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/lib/pcl_apps.lib" "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/pcl_apps.pc")
|
|
|
|
|
2021-12-18 01:07:21 +08:00
|
|
|
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
2023-04-25 06:31:10 +08:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt")
|