Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[triangle] Add new port #13322

Merged
merged 18 commits into from
Sep 15, 2020
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions ports/libigl-triangle/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
cmake_minimum_required(VERSION 2.8.12)
project(triangle)

add_library(triangle triangle.c exports.def)
target_compile_definitions(triangle PRIVATE -DTRILIBRARY -DANSI_DECLARATORS)
if(WIN32)
target_compile_definitions(triangle PRIVATE -DNO_TIMER)
endif()

target_include_directories(triangle PUBLIC
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}>
$<INSTALL_INTERFACE:${CMAKE_SOURCE_DIR}>
)

# Generate position independent code
set_target_properties(triangle PROPERTIES POSITION_INDEPENDENT_CODE ON)

set_target_properties(triangle PROPERTIES PUBLIC_HEADER
"${CMAKE_SOURCE_DIR}/triangle.h"
)

install(TARGETS triangle
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
)
5 changes: 5 additions & 0 deletions ports/libigl-triangle/CONTROL
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Source: libigl-triangle
Version: 1.6
Homepage: https://github.com/libigl/triangle
Description: A Two-Dimensional Quality Mesh Generator and Delaunay Triangulator. Port from Jonathan Shewchuk's code which adds 64-bit support and the ability to build as library.
Supports: !(arm|uwp)
n4z4m3 marked this conversation as resolved.
Show resolved Hide resolved
3 changes: 3 additions & 0 deletions ports/libigl-triangle/exports.def
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
EXPORTS
triangulate
trifree
24 changes: 24 additions & 0 deletions ports/libigl-triangle/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
vcpkg_fail_port_install(ON_ARCH "arm" ON_TARGET "uwp")
n4z4m3 marked this conversation as resolved.
Show resolved Hide resolved

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO libigl/triangle
REF d284c4a843efac043c310f5fa640b17cf7d96170
SHA512 0f2377663e84dfbbf082d13af6d535ae7e6c22655f8f1a34a9e7bc657edcf0ad7fd991e42afb11c750548579c7b637d179a818092b408e9df4b59338a28e6bbf
HEAD_REF master
)

file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
file(COPY ${CMAKE_CURRENT_LIST_DIR}/exports.def DESTINATION ${SOURCE_PATH})

vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
)

vcpkg_install_cmake()

vcpkg_copy_pdbs()

file(INSTALL "${SOURCE_PATH}/triangle.h" DESTINATION ${CURRENT_PACKAGES_DIR}/include)
n4z4m3 marked this conversation as resolved.
Show resolved Hide resolved
file(INSTALL ${SOURCE_PATH}/README DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
2 changes: 2 additions & 0 deletions scripts/ci.baseline.txt
Original file line number Diff line number Diff line change
Expand Up @@ -729,6 +729,8 @@ libidn2:x64-osx=fail
libigl:arm64-windows=fail
libigl:arm-uwp=fail
libigl:x64-uwp=fail
libigl-triangle:arm-uwp=fail
libigl-triangle:x64-uwp=fail
n4z4m3 marked this conversation as resolved.
Show resolved Hide resolved
n4z4m3 marked this conversation as resolved.
Show resolved Hide resolved
liblemon:arm-uwp=fail
liblemon:x64-uwp=fail
liblinear:arm-uwp=fail
Expand Down