Skip to content

Commit af90a9c

Browse files
authored
Add fast-obj library (microsoft#49975)
1 parent ac7af74 commit af90a9c

File tree

5 files changed

+76
-0
lines changed

5 files changed

+76
-0
lines changed

ports/fast-obj/CMakeLists.txt

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
cmake_minimum_required(VERSION 3.22)
2+
project(fast-obj C)
3+
4+
add_library(fast-obj fast_obj.c)
5+
6+
target_include_directories(fast-obj PUBLIC
7+
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
8+
$<INSTALL_INTERFACE:include>
9+
)
10+
11+
install(TARGETS fast-obj EXPORT fast-obj-config
12+
ARCHIVE DESTINATION lib
13+
LIBRARY DESTINATION lib
14+
RUNTIME DESTINATION bin
15+
)
16+
17+
install(FILES fast_obj.h DESTINATION include)
18+
19+
install(EXPORT fast-obj-config
20+
NAMESPACE fast-obj::
21+
DESTINATION share/fast-obj
22+
)

ports/fast-obj/portfile.cmake

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
2+
3+
vcpkg_from_github(
4+
OUT_SOURCE_PATH SOURCE_PATH
5+
REPO thisistherk/fast_obj
6+
REF "v${VERSION}"
7+
SHA512 8db413ce3526a91be7834d7fcec23b012738d017d2e28e4fc212fd58c0f5ef7fe4e7aea07aaf440fdc3ec7e6a6bfa32ea777a344a166246bcfd7bd35938b359f
8+
HEAD_REF master
9+
)
10+
11+
file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}")
12+
13+
vcpkg_cmake_configure(
14+
SOURCE_PATH "${SOURCE_PATH}"
15+
)
16+
17+
vcpkg_cmake_install()
18+
19+
vcpkg_cmake_config_fixup(PACKAGE_NAME "fast-obj")
20+
21+
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
22+
23+
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")

ports/fast-obj/vcpkg.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"name": "fast-obj",
3+
"version": "1.3",
4+
"description": "Fast C OBJ parser - a single-header C/C++ library for loading Wavefront .obj files.",
5+
"homepage": "https://github.com/thisistherk/fast_obj",
6+
"license": "MIT",
7+
"dependencies": [
8+
"fmt",
9+
{
10+
"name": "vcpkg-cmake",
11+
"host": true
12+
},
13+
{
14+
"name": "vcpkg-cmake-config",
15+
"host": true
16+
}
17+
]
18+
}

versions/baseline.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2912,6 +2912,10 @@
29122912
"baseline": "8.2.3",
29132913
"port-version": 0
29142914
},
2915+
"fast-obj": {
2916+
"baseline": "1.3",
2917+
"port-version": 0
2918+
},
29152919
"fastcdr": {
29162920
"baseline": "2.3.5",
29172921
"port-version": 0

versions/f-/fast-obj.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"versions": [
3+
{
4+
"git-tree": "c3eb88fc23edf4ec4553dec32730bbf5cd40ed73",
5+
"version": "1.3",
6+
"port-version": 0
7+
}
8+
]
9+
}

0 commit comments

Comments
 (0)