[xlnt] Use vcpkg_from_github()

This commit is contained in:
Alexander Karatarakis 2018-06-26 19:05:11 -07:00
parent 893f6bd0d3
commit 16e7beb4f0
2 changed files with 9 additions and 13 deletions

View File

@ -1,3 +1,3 @@
Source: xlnt
Version: 1.2.0-1
Version: 1.2.0-2
Description: Cross-platform user-friendly xlsx library for C++14

View File

@ -1,17 +1,13 @@
include(vcpkg_common_functions)
set(XLNT_VERSION 1.2.0)
set(XLNT_HASH 359ff1e99531513d7b1228ff07f137531be99d7a95bbc5b399168a6c609f56dba2e030464f8203db92db137ab80dbe10f71de71a62b0bcb96eaafc0f09256339)
set(XLNT_SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/xlnt-${XLNT_VERSION})
vcpkg_download_distfile(ARCHIVE
URLS https://github.com/tfussell/xlnt/archive/v${XLNT_VERSION}.zip
FILENAME xlnt-${XLNT_VERSION}.zip
SHA512 ${XLNT_HASH}
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO tfussell/xlnt
REF v1.2.0
SHA512 e95eeb23ffe0bd68081a3a1dccfc2164697d4fac4386ddb9cc1029180a499de250c28df34d1b3971ff26e95a55d822f43efe032aa989321ee29d3d3e7a8b5587
HEAD_REF master
)
vcpkg_extract_source_archive(${ARCHIVE})
if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
set(STATIC OFF)
else()
@ -19,7 +15,7 @@ else()
endif()
vcpkg_configure_cmake(
SOURCE_PATH ${XLNT_SOURCE_PATH}
SOURCE_PATH ${SOURCE_PATH}
OPTIONS -DTESTS=OFF -DSAMPLES=OFF -DBENCHMARKS=OFF -DSTATIC=${STATIC}
)
@ -28,6 +24,6 @@ vcpkg_install_cmake()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/man)
file(INSTALL ${XLNT_SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/xlnt RENAME copyright)
file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/xlnt RENAME copyright)
vcpkg_copy_pdbs()