diff options
| author | ras0219 <533828+ras0219@users.noreply.github.com> | 2020-09-09 20:40:15 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-09-09 20:40:15 -0700 |
| commit | f6df03b4a819bf78bc0cdf8b2369ffffc44cd894 (patch) | |
| tree | ae3b16c8082f8202e9a01004e4b17cfdcfd52658 /ports/polyclipping | |
| parent | 32b6c3a134022db7b985ed5f7d1f2ff13a96a140 (diff) | |
| download | vcpkg-f6df03b4a819bf78bc0cdf8b2369ffffc44cd894.tar.gz vcpkg-f6df03b4a819bf78bc0cdf8b2369ffffc44cd894.zip | |
[assimp][irrxml][kubazip][poly2tri][polyclipping] Extract vendored dependencies (#13264)
* [assimp] Fix -config.cmake files
* [assimp] Fix linux build and provide backwards-compatible alias
* [assimp][irrxml][kubazip][poly2tri][polyclipping] Extract vendored dependencies
* [assimp] Use find_dependency(); add ZLIB dependency
* [polyclipping] Do not suffix upstream binaries
Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
Co-authored-by: Stefano Sinigardi <stesinigardi@hotmail.com>
Diffstat (limited to 'ports/polyclipping')
| -rw-r--r-- | ports/polyclipping/CONTROL | 3 | ||||
| -rw-r--r-- | ports/polyclipping/FindCLIPPER.cmake | 45 | ||||
| -rw-r--r-- | ports/polyclipping/fix_targets.patch | 16 | ||||
| -rw-r--r-- | ports/polyclipping/portfile.cmake | 6 | ||||
| -rw-r--r-- | ports/polyclipping/vcpkg-cmake-wrapper.cmake | 10 |
5 files changed, 79 insertions, 1 deletions
diff --git a/ports/polyclipping/CONTROL b/ports/polyclipping/CONTROL index 198090cc6..819697deb 100644 --- a/ports/polyclipping/CONTROL +++ b/ports/polyclipping/CONTROL @@ -1,4 +1,5 @@ Source: polyclipping -Version: 6.4.2-4 +Version: 6.4.2 +Port-Version: 5 Homepage: https://sourceforge.net/projects/polyclipping/ 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. diff --git a/ports/polyclipping/FindCLIPPER.cmake b/ports/polyclipping/FindCLIPPER.cmake new file mode 100644 index 000000000..5a1fcab34 --- /dev/null +++ b/ports/polyclipping/FindCLIPPER.cmake @@ -0,0 +1,45 @@ +# Distributed under the OSI-approved BSD 3-Clause License. + +#.rst: +# FindCLIPPER +# -------- +# +# Result Variables +# ^^^^^^^^^^^^^^^^ +# +# This module will set the following variables in your project:: +# +# ``CLIPPER_FOUND`` +# True if CLIPPER found on the local system +# +# ``CLIPPER_INCLUDE_DIRS`` +# Location of CLIPPER header files. +# +# ``CLIPPER_LIBRARIES`` +# The clipper libraries. +# + +include(FindPackageHandleStandardArgs) +include(SelectLibraryConfigurations) + +if(NOT CLIPPER_INCLUDE_DIR) + find_path(CLIPPER_INCLUDE_DIR clipper.hpp + PATH_SUFFIXES polyclipping) +endif() + +if(NOT CLIPPER_LIBRARY) + find_library(CLIPPER_LIBRARY_RELEASE NAMES polyclipping PATHS "${CMAKE_CURRENT_LIST_DIR}/../../lib" NO_DEFAULT_PATH) + find_library(CLIPPER_LIBRARY_DEBUG NAMES polyclipping PATHS "${CMAKE_CURRENT_LIST_DIR}/../../debug/lib" NO_DEFAULT_PATH) + select_library_configurations(CLIPPER) +endif() + +mark_as_advanced(CLIPPER_LIBRARY CLIPPER_INCLUDE_DIR) + +find_package_handle_standard_args(CLIPPER + REQUIRED_VARS CLIPPER_LIBRARY CLIPPER_INCLUDE_DIR +) + +if(CLIPPER_FOUND) + set(CLIPPER_LIBRARIES ${CLIPPER_LIBRARY}) + set(CLIPPER_INCLUDE_DIRS ${CLIPPER_INCLUDE_DIR}) +endif() diff --git a/ports/polyclipping/fix_targets.patch b/ports/polyclipping/fix_targets.patch new file mode 100644 index 000000000..2435fe046 --- /dev/null +++ b/ports/polyclipping/fix_targets.patch @@ -0,0 +1,16 @@ +diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt +index f0ed7e8..a5ed444 100644 +--- a/cpp/CMakeLists.txt ++++ b/cpp/CMakeLists.txt +@@ -19,3 +19,11 @@ INSTALL (TARGETS polyclipping LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}") + INSTALL (FILES "${PCFILE}" DESTINATION "${CMAKE_INSTALL_PKGCONFIGDIR}") + + SET_TARGET_PROPERTIES(polyclipping PROPERTIES VERSION 22.0.0 SOVERSION 22 ) ++ ++install(TARGETS polyclipping EXPORT polyclippingConfig) ++ ++install( ++ EXPORT polyclippingConfig ++ NAMESPACE polyclipping:: ++ DESTINATION share/polyclipping ++) diff --git a/ports/polyclipping/portfile.cmake b/ports/polyclipping/portfile.cmake index 1626d81ba..8eb73a635 100644 --- a/ports/polyclipping/portfile.cmake +++ b/ports/polyclipping/portfile.cmake @@ -6,6 +6,8 @@ vcpkg_from_sourceforge( FILENAME "clipper_ver6.4.2.zip" NO_REMOVE_ONE_LEVEL SHA512 ffc88818c44a38aa278d5010db6cfd505796f39664919f1e48c7fa9267563f62135868993e88f7246dcd688241d1172878e4a008a390648acb99738452e3e5dd + PATCHES + fix_targets.patch ) vcpkg_configure_cmake( @@ -13,9 +15,13 @@ vcpkg_configure_cmake( PREFER_NINJA ) + vcpkg_install_cmake() +vcpkg_fixup_cmake_targets() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/FindCLIPPER.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/clipper) +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/clipper) file(INSTALL ${SOURCE_PATH}/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/polyclipping/vcpkg-cmake-wrapper.cmake b/ports/polyclipping/vcpkg-cmake-wrapper.cmake new file mode 100644 index 000000000..bd8934208 --- /dev/null +++ b/ports/polyclipping/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,10 @@ +list(REMOVE_ITEM ARGS "NO_MODULE") +list(REMOVE_ITEM ARGS "CONFIG") +list(REMOVE_ITEM ARGS "MODULE") + +set(clipper_PREV_MODULE_PATH ${CMAKE_MODULE_PATH}) +list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) + +_find_package(${ARGS}) + +set(CMAKE_MODULE_PATH ${clipper_PREV_MODULE_PATH}) |
