mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-30 18:29:11 +08:00
390806e931
Fix PCL port according to QHull port change. PCL will link dynamic link librariy of QHull when build dynamic link library configure.
69 lines
2.0 KiB
CMake
69 lines
2.0 KiB
CMake
include(vcpkg_common_functions)
|
|
|
|
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO PointCloudLibrary/pcl
|
|
REF pcl-1.8.1
|
|
SHA512 9e7c87fb750a176712f08d215a906012c9e8174b687bbc8c08fa65de083b4468951bd8017b10409015d5eff0fc343885d2aae5c340346118b1a251af7bdd5cd7
|
|
HEAD_REF master
|
|
)
|
|
|
|
vcpkg_apply_patches(
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
PATCHES "${CMAKE_CURRENT_LIST_DIR}/cmakelists.patch"
|
|
"${CMAKE_CURRENT_LIST_DIR}/config.patch"
|
|
"${CMAKE_CURRENT_LIST_DIR}/config_install.patch"
|
|
"${CMAKE_CURRENT_LIST_DIR}/find_flann.patch"
|
|
"${CMAKE_CURRENT_LIST_DIR}/find_qhull.patch"
|
|
"${CMAKE_CURRENT_LIST_DIR}/find_openni2.patch"
|
|
"${CMAKE_CURRENT_LIST_DIR}/vs2017-15.4-workaround.patch"
|
|
)
|
|
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" PCL_SHARED_LIBS)
|
|
|
|
set(WITH_OPENNI2 OFF)
|
|
if("openni2" IN_LIST FEATURES)
|
|
set(WITH_OPENNI2 ON)
|
|
endif()
|
|
|
|
set(WITH_QT OFF)
|
|
if("qt" IN_LIST FEATURES)
|
|
set(WITH_QT ON)
|
|
endif()
|
|
|
|
set(WITH_PCAP OFF)
|
|
if("pcap" IN_LIST FEATURES)
|
|
set(WITH_PCAP ON)
|
|
endif()
|
|
|
|
vcpkg_configure_cmake(
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
PREFER_NINJA
|
|
OPTIONS
|
|
# BUILD
|
|
-DBUILD_surface_on_nurbs=ON
|
|
-DBUILD_tools=OFF
|
|
# PCL
|
|
-DPCL_BUILD_WITH_BOOST_DYNAMIC_LINKING_WIN32=${PCL_SHARED_LIBS}
|
|
-DPCL_BUILD_WITH_FLANN_DYNAMIC_LINKING_WIN32=${PCL_SHARED_LIBS}
|
|
-DPCL_SHARED_LIBS=${PCL_SHARED_LIBS}
|
|
# WITH
|
|
-DWITH_CUDA=OFF
|
|
-DWITH_LIBUSB=OFF
|
|
-DWITH_OPENNI2=${WITH_OPENNI2}
|
|
-DWITH_PCAP=${WITH_PCAP}
|
|
-DWITH_PNG=OFF
|
|
-DWITH_QHULL=ON
|
|
-DWITH_QT=${WITH_QT}
|
|
-DWITH_VTK=ON
|
|
)
|
|
|
|
vcpkg_install_cmake()
|
|
vcpkg_fixup_cmake_targets(CONFIG_PATH share/pcl)
|
|
vcpkg_copy_pdbs()
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
|
|
|
file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/pcl)
|
|
file(RENAME ${CURRENT_PACKAGES_DIR}/share/pcl/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/pcl/copyright)
|