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

[xatlas] Create a new port #126

Merged
merged 4 commits into from
Nov 16, 2023
Merged
Show file tree
Hide file tree
Changes from all 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
34 changes: 34 additions & 0 deletions ports/xatlas/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
cmake_minimum_required(VERSION 3.13)
project(xatlas LANGUAGES CXX)
include(GNUInstallDirs)

set(CMAKE_CXX_STANDARD 11)

list(APPEND headers xatlas/xatlas.h xatlas/xatlas_c.h)

add_library(xatlas
${headers}
xatlas/xatlas.cpp
)

set_target_properties(xatlas
PROPERTIES
PUBLIC_HEADER "${headers}"
)

if(BUILD_SHARED_LIBS)
target_compile_definitions(xatlas PRIVATE XATLAS_EXPORT_API=1)
else()
target_compile_definitions(xatlas PRIVATE XATLAS_EXPORT_API=0)
endif()

install(TARGETS xatlas
EXPORT xatlas-config # minor trick to support `find_package(xatlas)`
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
)
install(EXPORT xatlas-config
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/xatlas # share/xatlas
)
23 changes: 23 additions & 0 deletions ports/xatlas/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
if(VCPKG_TARGET_IS_WINDOWS)
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
endif()

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO jpcy/xatlas
REF f700c7790aaa030e794b52ba7791a05c085faf0c
SHA512 1f7afcc9056ab636abef017033aaf63d219cdec95e871beade2c694f8e8b4a58563cf506c5afb6d0d5536233f791e11adbcf3f6f26548105b31d381289892dea
HEAD_REF master
)
file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}/source")

vcpkg_cmake_configure(SOURCE_PATH "${SOURCE_PATH}/source")
vcpkg_cmake_install()
vcpkg_cmake_config_fixup(CONFIG_PATH share/${PORT})
vcpkg_copy_pdbs()

file(REMOVE_RECURSE
"${CURRENT_PACKAGES_DIR}/debug/include"
"${CURRENT_PACKAGES_DIR}/debug/share"
)
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
16 changes: 16 additions & 0 deletions ports/xatlas/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"name": "xatlas",
"version-date": "2023-11-07",
"description": "Mesh parameterization / UV unwrapping library",
"homepage": "https://github.com/jpcy/xatlas",
"dependencies": [
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
]
}
1 change: 1 addition & 0 deletions test/vcpkg.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"name": "vcpkg-cmake",
"host": true
},
"xatlas",
"zlib-ng"
]
}
4 changes: 4 additions & 0 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,10 @@
"baseline": "2021-11-13",
"port-version": 0
},
"xatlas": {
"baseline": "2023-11-07",
"port-version": 0
},
"xnnpack": {
"baseline": "2023-04-13",
"port-version": 0
Expand Down
9 changes: 9 additions & 0 deletions versions/x-/xatlas.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "e646b0e7caaf2a87b82e94132fca858f1ae73272",
"version-date": "2023-11-07",
"port-version": 0
}
]
}
Loading