early-access version 2853
This commit is contained in:
57
externals/vcpkg/ports/poly2tri/CMakeLists.txt
vendored
Executable file
57
externals/vcpkg/ports/poly2tri/CMakeLists.txt
vendored
Executable file
@@ -0,0 +1,57 @@
|
||||
cmake_minimum_required(VERSION 3.0)
|
||||
|
||||
project(poly2tri LANGUAGES C CXX)
|
||||
|
||||
set(INSTALL_BIN_DIR "bin" CACHE PATH "Path where exe and dll will be installed")
|
||||
set(INSTALL_LIB_DIR "lib" CACHE PATH "Path where lib will be installed")
|
||||
set(INSTALL_INCLUDE_DIR "include/${PROJECT_NAME}" CACHE PATH "Path where headers will be installed")
|
||||
set(INSTALL_CMAKE_DIR "share/${PROJECT_NAME}" CACHE PATH "Path where cmake configs will be installed")
|
||||
|
||||
set(${PROJECT_NAME}_HEADERS
|
||||
"poly2tri/poly2tri.h"
|
||||
)
|
||||
|
||||
set(${PROJECT_NAME}_COMMON_HEADERS
|
||||
"poly2tri/common/shapes.h"
|
||||
"poly2tri/common/utils.h"
|
||||
)
|
||||
|
||||
set(${PROJECT_NAME}_SWEEP_HEADERS
|
||||
"poly2tri/sweep/advancing_front.h"
|
||||
"poly2tri/sweep/cdt.h"
|
||||
"poly2tri/sweep/sweep.h"
|
||||
"poly2tri/sweep/sweep_context.h"
|
||||
)
|
||||
|
||||
set(${PROJECT_NAME}_SOURCES
|
||||
"poly2tri/common/shapes.cc"
|
||||
"poly2tri/sweep/advancing_front.cc"
|
||||
"poly2tri/sweep/cdt.cc"
|
||||
"poly2tri/sweep/sweep.cc"
|
||||
"poly2tri/sweep/sweep_context.cc"
|
||||
)
|
||||
|
||||
add_library(${PROJECT_NAME} "${${PROJECT_NAME}_HEADERS}" "${${PROJECT_NAME}_COMMON_HEADERS}" "${${PROJECT_NAME}_SWEEP_HEADERS}" "${${PROJECT_NAME}_SOURCES}")
|
||||
set_target_properties(${PROJECT_NAME} PROPERTIES PUBLIC_HEADER "${${PROJECT_NAME}_HEADERS}")
|
||||
target_include_directories(${PROJECT_NAME} PUBLIC
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/poly2tri>
|
||||
$<INSTALL_INTERFACE:include>
|
||||
$<INSTALL_INTERFACE:include/${PROJECT_NAME}>
|
||||
)
|
||||
|
||||
install(FILES ${${PROJECT_NAME}_COMMON_HEADERS} DESTINATION "${INSTALL_INCLUDE_DIR}/common")
|
||||
install(FILES ${${PROJECT_NAME}_SWEEP_HEADERS} DESTINATION "${INSTALL_INCLUDE_DIR}/sweep")
|
||||
|
||||
install(TARGETS ${PROJECT_NAME} EXPORT ${PROJECT_NAME}Targets
|
||||
RUNTIME DESTINATION "${INSTALL_BIN_DIR}"
|
||||
LIBRARY DESTINATION "${INSTALL_LIB_DIR}"
|
||||
ARCHIVE DESTINATION "${INSTALL_LIB_DIR}"
|
||||
PUBLIC_HEADER DESTINATION "${INSTALL_INCLUDE_DIR}"
|
||||
COMPONENT dev
|
||||
)
|
||||
|
||||
install (EXPORT ${PROJECT_NAME}Targets
|
||||
FILE ${PROJECT_NAME}Config.cmake
|
||||
NAMESPACE ${PROJECT_NAME}::
|
||||
DESTINATION "${INSTALL_CMAKE_DIR}"
|
||||
)
|
||||
13
externals/vcpkg/ports/poly2tri/fix-sweep-h-codepage.patch
vendored
Executable file
13
externals/vcpkg/ports/poly2tri/fix-sweep-h-codepage.patch
vendored
Executable file
@@ -0,0 +1,13 @@
|
||||
diff --git a/poly2tri/sweep/sweep.h b/poly2tri/sweep/sweep.h
|
||||
index f62c4cc..af8af69 100644
|
||||
--- a/poly2tri/sweep/sweep.h
|
||||
+++ b/poly2tri/sweep/sweep.h
|
||||
@@ -33,7 +33,7 @@
|
||||
* Zalik, B.(2008)'Sweep-line algorithm for constrained Delaunay triangulation',
|
||||
* International Journal of Geographical Information Science
|
||||
*
|
||||
- * "FlipScan" Constrained Edge Algorithm invented by Thomas <20>hl<68>n, thahlen@gmail.com
|
||||
+ * "FlipScan" Constrained Edge Algorithm invented by Thomas, thahlen@gmail.com
|
||||
*/
|
||||
|
||||
#ifndef SWEEP_H
|
||||
25
externals/vcpkg/ports/poly2tri/portfile.cmake
vendored
Executable file
25
externals/vcpkg/ports/poly2tri/portfile.cmake
vendored
Executable file
@@ -0,0 +1,25 @@
|
||||
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO greenm01/poly2tri
|
||||
REF 88de49021b6d9bef6faa1bc94ceb3fbd85c3c204
|
||||
SHA512 fa256bcf923ad59f42205edf5a7e07cac6cbd9a37cefb9a0961a2e06aea7fa8ffd09d4e26154c0028601c12804483842cb935d9f602385f5f203c9628382c4fb
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
fix-sweep-h-codepage.patch
|
||||
)
|
||||
|
||||
file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}")
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
)
|
||||
|
||||
vcpkg_cmake_install()
|
||||
vcpkg_cmake_config_fixup()
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
||||
|
||||
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
||||
18
externals/vcpkg/ports/poly2tri/vcpkg.json
vendored
Executable file
18
externals/vcpkg/ports/poly2tri/vcpkg.json
vendored
Executable file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"name": "poly2tri",
|
||||
"version-string": "2020-07-21",
|
||||
"port-version": 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.",
|
||||
"homepage": "https://github.com/greenm01/poly2tri",
|
||||
"supports": "!uwp",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user