Skip to content

Commit

Permalink
[meshoptimizer] Updating to 0.18 and adding gltfpack feature (#27266)
Browse files Browse the repository at this point in the history
* Updating meshoptimizer and adding optional feature to build gltfpack

* Updating version

* Adding license to meshoptimizer

* Updating version
  • Loading branch information
Honeybunch authored Oct 19, 2022
1 parent 911d176 commit da21221
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 6 deletions.
16 changes: 13 additions & 3 deletions ports/meshoptimizer/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,17 +1,23 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO zeux/meshoptimizer
REF v0.16
SHA512 CC6D28359FB99A615E1046A4AF1B247CBC6EA0266D9E7F41EA0516C1FC09FA1E67376071DAF138A126C77BCA3BAF9D565636ED0E3ADF045F1A08498C38B7A7E7
REF v0.18
SHA512 b9fd6ce61c7d7b673892ace74feb300628d4bbbba4e912dba4a756d9709b952dde45b706c581df3fd0aef1e7065ff730d1827b0d6c724d716ccf41efb1953d3e
HEAD_REF master
)

vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
gltfpack MESHOPT_BUILD_GLTFPACK
)

string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_SHARED_LIBS)

vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DMESHOPT_BUILD_SHARED_LIBS=${BUILD_SHARED_LIBS}
${FEATURE_OPTIONS}
-DMESHOPT_BUILD_SHARED_LIBS=${BUILD_SHARED_LIBS}
)

vcpkg_cmake_install()
Expand All @@ -20,6 +26,10 @@ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")

vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/meshoptimizer)

if ("gltfpack" IN_LIST FEATURES)
vcpkg_copy_tools(TOOL_NAMES gltfpack AUTO_CLEAN)
endif()

# Handle copyright
file(INSTALL "${SOURCE_PATH}/LICENSE.md" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)

Expand Down
10 changes: 8 additions & 2 deletions ports/meshoptimizer/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"name": "meshoptimizer",
"version": "0.16",
"version": "0.18",
"description": "Mesh optimization library that makes meshes smaller and faster to render",
"homepage": "https://github.com/zeux/meshoptimizer",
"license": "MIT",
"dependencies": [
{
"name": "vcpkg-cmake",
Expand All @@ -12,5 +13,10 @@
"name": "vcpkg-cmake-config",
"host": true
}
]
],
"features": {
"gltfpack": {
"description": "Build gltfpack tool"
}
}
}
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -4749,7 +4749,7 @@
"port-version": 5
},
"meshoptimizer": {
"baseline": "0.16",
"baseline": "0.18",
"port-version": 0
},
"metis": {
Expand Down
5 changes: 5 additions & 0 deletions versions/m-/meshoptimizer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "bc06ee0eb1b2510c67f2bf0d6940fd10395990a4",
"version": "0.18",
"port-version": 0
},
{
"git-tree": "a1693991d70ae383ea21f4f634f8d0f136e15bd7",
"version": "0.16",
Expand Down

0 comments on commit da21221

Please sign in to comment.