[rapidobj] add new port (#45429)

Co-authored-by: Lily Wang <94091114+LilyWangLL@users.noreply.github.com>
This commit is contained in:
Matthew Oliver 2025-05-14 04:46:44 +10:00 committed by GitHub
parent bf4a63362e
commit dbe35ceb30
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 71 additions and 0 deletions

View File

@ -0,0 +1,13 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a8f9f25..21e2c37 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -19,7 +19,7 @@ option(RAPIDOBJ_BuildExamples "Build Examples." OFF)
set(RAPIDOBJ_INCLUDE_DIR "${CMAKE_INSTALL_INCLUDEDIR}" CACHE STRING "Header Include Folder.")
-set(RAPIDOBJ_CMAKE_DIR "${CMAKE_INSTALL_LIBDIR}/cmake" CACHE STRING "CMake Config Folder.")
+set(RAPIDOBJ_CMAKE_DIR "${CMAKE_INSTALL_PREFIX}/share" CACHE STRING "CMake Config Folder.")
if (RAPIDOBJ_BuildTests OR RAPIDOBJ_BuildTools)
add_subdirectory(external EXCLUDE_FROM_ALL)
endif()

View File

@ -0,0 +1,28 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO guybrush77/rapidobj
REF "v${VERSION}"
SHA512 eddd03556348e44de60af8bd15b5f614ed2588e7c26e0b57cc436f65394d579f379b991126e6542374cfd4f2e110b305ce19135605adc60609448beb53e03d53
HEAD_REF master
PATCHES
fix-build.patch
)
set(VCPKG_BUILD_TYPE release) # header-only port
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
)
vcpkg_cmake_install()
vcpkg_cmake_config_fixup()
vcpkg_fixup_pkgconfig()
file(
REMOVE_RECURSE
${CURRENT_PACKAGES_DIR}/debug
${CURRENT_PACKAGES_DIR}/lib
)
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")

17
ports/rapidobj/vcpkg.json Normal file
View File

@ -0,0 +1,17 @@
{
"name": "rapidobj",
"version": "1.1",
"description": "A fast, header-only, C++17 library for parsing Wavefront .obj files",
"license": "MIT",
"supports": "!android & !linux",
"dependencies": [
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
]
}

View File

@ -8072,6 +8072,10 @@
"baseline": "2025-02-26",
"port-version": 0
},
"rapidobj": {
"baseline": "1.1",
"port-version": 0
},
"rapidxml": {
"baseline": "1.13",
"port-version": 7

View File

@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "f6399d7834c8b1abc57a9b6f6b4daee3aa23185a",
"version": "1.1",
"port-version": 0
}
]
}