vcpkg/ports/draco/portfile.cmake

44 lines
1.3 KiB
CMake
Raw Normal View History

2017-07-06 05:16:34 +08:00
include(vcpkg_common_functions)
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
2017-07-06 05:16:34 +08:00
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO google/draco
2018-07-03 19:33:51 +08:00
REF 1.3.3
SHA512 80ed5a623046822f5bb26b2454c8ee8cc93ffe9eb3012e8461cefdfc577b26d69a92ea0f0c5e14f5f48c1ef99f9a7263b01710df376792e74358ae14e49c3897
2017-07-06 05:16:34 +08:00
HEAD_REF master
PATCHES
fix-compile-error-uwp.patch
2017-07-06 05:16:34 +08:00
)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
)
vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/draco/cmake)
2017-07-06 05:16:34 +08:00
# Install tools and plugins
file(GLOB TOOLS "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.exe")
if(TOOLS)
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/draco)
file(COPY ${TOOLS} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/draco)
endif()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/draco)
2017-07-06 05:16:34 +08:00
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/draco)
2017-07-06 05:16:34 +08:00
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
2017-07-06 05:16:34 +08:00
vcpkg_copy_pdbs()
# Handle copyright
file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/draco)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/draco/LICENSE ${CURRENT_PACKAGES_DIR}/share/draco/copyright)