mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-25 03:30:38 +08:00
da212216c9
* Updating meshoptimizer and adding optional feature to build gltfpack * Updating version * Adding license to meshoptimizer * Updating version
36 lines
978 B
CMake
36 lines
978 B
CMake
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO zeux/meshoptimizer
|
|
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
|
|
${FEATURE_OPTIONS}
|
|
-DMESHOPT_BUILD_SHARED_LIBS=${BUILD_SHARED_LIBS}
|
|
)
|
|
|
|
vcpkg_cmake_install()
|
|
|
|
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)
|
|
|
|
vcpkg_copy_pdbs() |