2020-07-14 23:38:18 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO zeux/meshoptimizer
|
2022-10-19 09:31:02 +08:00
|
|
|
REF v0.18
|
|
|
|
SHA512 b9fd6ce61c7d7b673892ace74feb300628d4bbbba4e912dba4a756d9709b952dde45b706c581df3fd0aef1e7065ff730d1827b0d6c724d716ccf41efb1953d3e
|
2020-07-14 23:38:18 +08:00
|
|
|
HEAD_REF master
|
2022-11-10 05:54:53 +08:00
|
|
|
PATCHES
|
|
|
|
no-werror.patch
|
2020-07-14 23:38:18 +08:00
|
|
|
)
|
|
|
|
|
2022-11-10 05:54:53 +08:00
|
|
|
# If we want basisu support in gltfpack we need a particular fork of basisu
|
|
|
|
# We could modify this to support using the vcpkg version of basisu
|
|
|
|
# but since this is only necessary for the gltfpack tool and not for the
|
|
|
|
# meshopt lib it shouldn't be too nasty to just grab this repo
|
|
|
|
if ("gltfpack" IN_LIST FEATURES)
|
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH BASISU_PATH
|
|
|
|
REPO zeux/basis_universal
|
|
|
|
REF 91ca86492bc046bf1d096067a1adcd2309e13dd2
|
|
|
|
SHA512 fe80533db60b40cdc72a64f766c2447ce5c923d84467a926c2e8af4ec42e278d9fa9823b41b3fc7d9b740dd2d41d2f606f0f9990f94d2398f253bc86350a4287
|
|
|
|
HEAD_REF gltfpack
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2022-10-19 09:31:02 +08:00
|
|
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
|
|
FEATURES
|
|
|
|
gltfpack MESHOPT_BUILD_GLTFPACK
|
|
|
|
)
|
|
|
|
|
2020-07-14 23:38:18 +08:00
|
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_SHARED_LIBS)
|
|
|
|
|
2021-09-29 23:36:24 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2020-07-14 23:38:18 +08:00
|
|
|
OPTIONS
|
2022-10-19 09:31:02 +08:00
|
|
|
${FEATURE_OPTIONS}
|
|
|
|
-DMESHOPT_BUILD_SHARED_LIBS=${BUILD_SHARED_LIBS}
|
2022-11-10 05:54:53 +08:00
|
|
|
-DMESHOPT_BASISU_PATH=${BASISU_PATH}
|
2020-07-14 23:38:18 +08:00
|
|
|
)
|
|
|
|
|
2021-09-29 23:36:24 +08:00
|
|
|
vcpkg_cmake_install()
|
2020-07-14 23:38:18 +08:00
|
|
|
|
2021-09-29 23:36:24 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
2020-07-14 23:38:18 +08:00
|
|
|
|
2021-09-29 23:36:24 +08:00
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/meshoptimizer)
|
2020-07-14 23:38:18 +08:00
|
|
|
|
2022-10-19 09:31:02 +08:00
|
|
|
if ("gltfpack" IN_LIST FEATURES)
|
|
|
|
vcpkg_copy_tools(TOOL_NAMES gltfpack AUTO_CLEAN)
|
|
|
|
endif()
|
|
|
|
|
2020-07-14 23:38:18 +08:00
|
|
|
# Handle copyright
|
2021-09-29 23:36:24 +08:00
|
|
|
file(INSTALL "${SOURCE_PATH}/LICENSE.md" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
2020-07-14 23:38:18 +08:00
|
|
|
|
2021-09-29 23:36:24 +08:00
|
|
|
vcpkg_copy_pdbs()
|