2017-07-05 23:30:18 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO PointCloudLibrary/pcl
|
2023-01-31 08:41:37 +08:00
|
|
|
REF 371a8e1373f7b2f66bbb92291be2f3e50dc19856 # pcl-1.13.0
|
|
|
|
SHA512 5c023e46386882d51a5d9a3c8ac594c17585e3d14c011964109ad0ae432c660ebb7fc1fe56f1130b6eafa75d1d9ca48f05e22e1d7cbb4a0794e32982da168563
|
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
|
|
|
|
pcl_config.patch
|
|
|
|
pcl_utils.patch
|
2021-12-18 01:07:21 +08:00
|
|
|
install-examples.patch
|
2022-01-26 13:38:48 +08:00
|
|
|
no-absolute.patch
|
2023-01-31 08:41:37 +08:00
|
|
|
add_bigobj_option.patch
|
|
|
|
outofcore_viewer_remove_include.patch
|
|
|
|
fix_opennurbs_win32.patch
|
|
|
|
disable_kinfu_for_cuda12.patch
|
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
|
2021-12-18 01:07:21 +08:00
|
|
|
openni2 WITH_OPENNI2
|
|
|
|
qt WITH_QT
|
|
|
|
pcap WITH_PCAP
|
|
|
|
cuda WITH_CUDA
|
|
|
|
cuda BUILD_CUDA
|
|
|
|
cuda BUILD_GPU
|
|
|
|
tools BUILD_tools
|
|
|
|
opengl WITH_OPENGL
|
|
|
|
libusb WITH_LIBUSB
|
2022-02-10 11:29:02 +08:00
|
|
|
visualization WITH_VTK
|
2021-12-18 01:07:21 +08:00
|
|
|
visualization BUILD_visualization
|
|
|
|
examples BUILD_examples
|
|
|
|
apps BUILD_apps
|
|
|
|
# These 2 apps need openni1
|
|
|
|
#apps BUILD_apps_in_hand_scanner
|
|
|
|
#apps BUILD_apps_3d_rec_framework
|
|
|
|
simulation BUILD_simulation
|
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
|
|
|
|
# BUILD
|
|
|
|
-DBUILD_surface_on_nurbs=ON
|
|
|
|
# PCL
|
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-01-31 08:41:37 +08:00
|
|
|
-DPCL_ALLOW_BOTH_SHARED_AND_STATIC_DEPENDENCIES=ON
|
2017-06-15 06:46:30 +08:00
|
|
|
# WITH
|
2018-03-02 02:45:41 +08:00
|
|
|
-DWITH_PNG=ON
|
2017-06-15 06:46:30 +08:00
|
|
|
-DWITH_QHULL=ON
|
2021-11-23 06:28:36 +08:00
|
|
|
-DWITH_OPENNI=OFF
|
|
|
|
-DWITH_ENSENSO=OFF
|
|
|
|
-DWITH_DAVIDSDK=OFF
|
|
|
|
-DWITH_DSSDK=OFF
|
|
|
|
-DWITH_RSSDK=OFF
|
|
|
|
-DWITH_RSSDK2=OFF
|
|
|
|
-DWITH_OPENMP=OFF
|
2019-08-14 11:13:55 +08:00
|
|
|
# FEATURES
|
|
|
|
${FEATURE_OPTIONS}
|
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
|
|
|
)
|
|
|
|
|
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)
|
2021-11-23 06:28:36 +08:00
|
|
|
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")
|
2018-03-02 02:45:41 +08:00
|
|
|
file(REMOVE ${EXEFILES_RELEASE} ${EXEFILES_DEBUG})
|
2021-11-23 06:28:36 +08:00
|
|
|
vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/pcl")
|
2018-03-02 02:45:41 +08:00
|
|
|
endif()
|
|
|
|
|
2021-12-18 01:07:21 +08:00
|
|
|
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
2021-11-23 06:28:36 +08:00
|
|
|
file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|