diff --git a/ports/rapidobj/fix-build.patch b/ports/rapidobj/fix-build.patch new file mode 100644 index 0000000000..f4aace0534 --- /dev/null +++ b/ports/rapidobj/fix-build.patch @@ -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() diff --git a/ports/rapidobj/portfile.cmake b/ports/rapidobj/portfile.cmake new file mode 100644 index 0000000000..40425c0fa0 --- /dev/null +++ b/ports/rapidobj/portfile.cmake @@ -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") diff --git a/ports/rapidobj/vcpkg.json b/ports/rapidobj/vcpkg.json new file mode 100644 index 0000000000..e87974b79f --- /dev/null +++ b/ports/rapidobj/vcpkg.json @@ -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 + } + ] +} diff --git a/versions/baseline.json b/versions/baseline.json index 1fbc29d79f..1a10145a4d 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -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 diff --git a/versions/r-/rapidobj.json b/versions/r-/rapidobj.json new file mode 100644 index 0000000000..af5655ed08 --- /dev/null +++ b/versions/r-/rapidobj.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "f6399d7834c8b1abc57a9b6f6b4daee3aa23185a", + "version": "1.1", + "port-version": 0 + } + ] +}