2017-12-24 00:14:20 +08:00
|
|
|
# libgit2 uses winapi functions not available in WindowsStore
|
|
|
|
if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore)
|
|
|
|
message(FATAL_ERROR "Error: UWP builds are not supported.")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
include(vcpkg_common_functions)
|
|
|
|
|
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO libgit2/libgit2
|
2019-05-22 12:00:24 +08:00
|
|
|
REF v0.28.1
|
|
|
|
SHA512 5a1bc5c6af6ad25cb8b2c446e75a774d2a615d4999ec3223d681c7b120d83e7cecd94f1ca549bac0802f5324e27e73cc5a6483ad410636c2f06f098b30b1b647
|
2018-10-09 15:27:45 +08:00
|
|
|
HEAD_REF master
|
|
|
|
)
|
|
|
|
|
|
|
|
string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" STATIC_CRT)
|
2017-12-24 00:14:20 +08:00
|
|
|
|
|
|
|
vcpkg_configure_cmake(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
|
|
PREFER_NINJA
|
2018-08-08 13:47:52 +08:00
|
|
|
OPTIONS
|
2017-12-24 00:14:20 +08:00
|
|
|
-DBUILD_CLAR=OFF
|
2018-10-09 15:27:45 +08:00
|
|
|
-DSTATIC_CRT=${STATIC_CRT}
|
2017-12-24 00:14:20 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_install_cmake()
|
|
|
|
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
|
|
|
|
|
|
|
file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libgit2)
|
|
|
|
file(RENAME ${CURRENT_PACKAGES_DIR}/share/libgit2/COPYING ${CURRENT_PACKAGES_DIR}/share/libgit2/copyright)
|