2017-06-15 06:46:30 +08:00
|
|
|
include(vcpkg_common_functions)
|
2017-07-05 23:30:18 +08:00
|
|
|
|
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO PointCloudLibrary/pcl
|
2017-08-08 20:39:18 +08:00
|
|
|
REF pcl-1.8.1
|
|
|
|
SHA512 9e7c87fb750a176712f08d215a906012c9e8174b687bbc8c08fa65de083b4468951bd8017b10409015d5eff0fc343885d2aae5c340346118b1a251af7bdd5cd7
|
2017-07-05 23:30:18 +08:00
|
|
|
HEAD_REF master
|
2017-06-15 06:46:30 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_apply_patches(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
2017-11-26 06:49:30 +08:00
|
|
|
PATCHES "${CMAKE_CURRENT_LIST_DIR}/cmakelists.patch"
|
|
|
|
"${CMAKE_CURRENT_LIST_DIR}/config.patch"
|
2017-06-15 06:46:30 +08:00
|
|
|
"${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"
|
2018-03-02 02:45:41 +08:00
|
|
|
"${CMAKE_CURRENT_LIST_DIR}/find_cuda.patch"
|
2017-11-10 16:31:46 +08:00
|
|
|
"${CMAKE_CURRENT_LIST_DIR}/vs2017-15.4-workaround.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
|
|
|
|
2017-11-17 21:19:25 +08:00
|
|
|
set(WITH_OPENNI2 OFF)
|
|
|
|
if("openni2" IN_LIST FEATURES)
|
|
|
|
set(WITH_OPENNI2 ON)
|
|
|
|
endif()
|
|
|
|
|
2017-10-30 21:13:25 +08:00
|
|
|
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()
|
|
|
|
|
2018-03-02 02:45:41 +08:00
|
|
|
set(WITH_CUDA OFF)
|
|
|
|
if("cuda" IN_LIST FEATURES)
|
|
|
|
set(WITH_CUDA ON)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
set(BUILD_TOOLS OFF)
|
|
|
|
if("tools" IN_LIST FEATURES)
|
|
|
|
set(BUILD_TOOLS ON)
|
|
|
|
endif()
|
|
|
|
|
2017-06-15 06:46:30 +08:00
|
|
|
vcpkg_configure_cmake(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
2017-08-08 20:39:18 +08:00
|
|
|
PREFER_NINJA
|
2017-06-15 06:46:30 +08:00
|
|
|
OPTIONS
|
|
|
|
# BUILD
|
|
|
|
-DBUILD_surface_on_nurbs=ON
|
2018-03-02 02:45:41 +08:00
|
|
|
-DBUILD_tools=${BUILD_TOOLS}
|
|
|
|
-DBUILD_CUDA=${WITH_CUDA}
|
|
|
|
-DBUILD_GPU=${WITH_CUDA} # build GPU when use CUDA
|
2017-06-15 06:46:30 +08:00
|
|
|
# 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}
|
|
|
|
-DPCL_SHARED_LIBS=${PCL_SHARED_LIBS}
|
2017-06-15 06:46:30 +08:00
|
|
|
# WITH
|
2018-03-02 02:45:41 +08:00
|
|
|
-DWITH_CUDA=${WITH_CUDA}
|
2017-06-15 06:46:30 +08:00
|
|
|
-DWITH_LIBUSB=OFF
|
2017-11-17 21:19:25 +08:00
|
|
|
-DWITH_OPENNI2=${WITH_OPENNI2}
|
2017-10-30 21:13:25 +08:00
|
|
|
-DWITH_PCAP=${WITH_PCAP}
|
2018-03-02 02:45:41 +08:00
|
|
|
-DWITH_PNG=ON
|
2017-06-15 06:46:30 +08:00
|
|
|
-DWITH_QHULL=ON
|
2017-10-30 21:13:25 +08:00
|
|
|
-DWITH_QT=${WITH_QT}
|
2017-06-15 06:46:30 +08:00
|
|
|
-DWITH_VTK=ON
|
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_install_cmake()
|
2017-11-10 16:31:46 +08:00
|
|
|
vcpkg_fixup_cmake_targets(CONFIG_PATH share/pcl)
|
|
|
|
vcpkg_copy_pdbs()
|
2017-06-15 06:46:30 +08:00
|
|
|
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
2018-03-15 07:49:54 +08:00
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
|
2017-11-10 16:31:46 +08:00
|
|
|
|
2018-03-02 02:45:41 +08:00
|
|
|
if(BUILD_TOOLS)
|
|
|
|
file(GLOB EXEFILES_RELEASE ${CURRENT_PACKAGES_DIR}/bin/*.exe)
|
|
|
|
file(GLOB EXEFILES_DEBUG ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe)
|
|
|
|
file(COPY ${EXEFILES_RELEASE} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/pcl)
|
|
|
|
file(REMOVE ${EXEFILES_RELEASE} ${EXEFILES_DEBUG})
|
|
|
|
vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/pcl)
|
|
|
|
endif()
|
|
|
|
|
2017-06-15 06:46:30 +08:00
|
|
|
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)
|