2017-06-15 06:46:30 +08:00
|
|
|
# Common Ambient Variables:
|
|
|
|
# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT}
|
|
|
|
# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET}
|
|
|
|
# CURRENT_PORT_DIR = ${VCPKG_ROOT_DIR}\ports\${PORT}
|
|
|
|
# PORT = current port name (zlib, etc)
|
|
|
|
# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc)
|
|
|
|
# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic)
|
|
|
|
# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic)
|
|
|
|
# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg>
|
|
|
|
# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm)
|
|
|
|
#
|
|
|
|
|
|
|
|
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}
|
|
|
|
PATCHES "${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"
|
|
|
|
)
|
|
|
|
|
2017-08-08 20:39:18 +08:00
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
|
|
|
|
set(LIBRARY_LINKAGE ON)
|
|
|
|
elseif(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
|
|
|
set(LIBRARY_LINKAGE OFF)
|
2017-06-15 06:46:30 +08:00
|
|
|
endif()
|
|
|
|
|
|
|
|
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
|
|
|
|
-DBUILD_tools=OFF
|
|
|
|
# PCL
|
2017-08-08 20:39:18 +08:00
|
|
|
-DPCL_BUILD_WITH_BOOST_DYNAMIC_LINKING_WIN32=${LIBRARY_LINKAGE}
|
|
|
|
-DPCL_BUILD_WITH_FLANN_DYNAMIC_LINKING_WIN32=${LIBRARY_LINKAGE}
|
|
|
|
-DPCL_SHARED_LIBS=${LIBRARY_LINKAGE}
|
2017-06-15 06:46:30 +08:00
|
|
|
# WITH
|
|
|
|
-DWITH_CUDA=OFF
|
|
|
|
-DWITH_LIBUSB=OFF
|
|
|
|
-DWITH_OPENNI2=ON
|
|
|
|
-DWITH_PCAP=OFF
|
|
|
|
-DWITH_PNG=OFF
|
|
|
|
-DWITH_QHULL=ON
|
2017-07-13 19:50:26 +08:00
|
|
|
-DWITH_QT=ON
|
2017-06-15 06:46:30 +08:00
|
|
|
-DWITH_VTK=ON
|
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_install_cmake()
|
|
|
|
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
|
|
|
|
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)
|