[polyclipping] new port (#6636)

* [clipper] add port

* [clipper] works only if built as a static library

* [clipper] rename to polyclipping
This commit is contained in:
Stefano Sinigardi 2019-06-04 00:09:09 +02:00 committed by Robert Schumacher
parent 35c8538e2c
commit ba259efd89
2 changed files with 31 additions and 0 deletions

View File

@ -0,0 +1,3 @@
Source: polyclipping
Version: 6.4.2
Description: The Clipper library performs clipping and offsetting for both lines and polygons. All four boolean clipping operations are supported - intersection, union, difference and exclusive-or. Polygons can be of any shape including self-intersecting polygons.

View File

@ -0,0 +1,28 @@
include(vcpkg_common_functions)
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
vcpkg_download_distfile(ARCHIVE
URLS "https://sourceforge.net/projects/polyclipping/files/clipper_ver6.4.2.zip/download"
FILENAME "clipper_ver6.4.2.zip"
SHA512 ffc88818c44a38aa278d5010db6cfd505796f39664919f1e48c7fa9267563f62135868993e88f7246dcd688241d1172878e4a008a390648acb99738452e3e5dd
)
vcpkg_extract_source_archive_ex(
OUT_SOURCE_PATH SOURCE_PATH
ARCHIVE ${ARCHIVE}
NO_REMOVE_ONE_LEVEL
REF 6.4.2
)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}/cpp
PREFER_NINJA
)
vcpkg_install_cmake()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
file(INSTALL ${SOURCE_PATH}/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)