2017-12-24 00:14:20 +08:00
|
|
|
# libgit2 uses winapi functions not available in WindowsStore
|
2020-02-29 14:25:31 +08:00
|
|
|
vcpkg_fail_port_install(ON_TARGET "uwp")
|
2017-12-24 00:14:20 +08:00
|
|
|
|
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO libgit2/libgit2
|
2020-04-17 03:03:13 +08:00
|
|
|
REF 7d3c7057f0e774aecd6fc4ef8333e69e5c4873e0#version 1.0.0
|
|
|
|
SHA512 bc1792052da87974c4c106ad2c9825b7b172da9829697205fa3032f394e24ac8354798db4cbe28ac55b1e565ecfb3d655c63fad90f53f0c291bf591a458f2cf8
|
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
|
|
|
|
2020-03-12 00:16:42 +08:00
|
|
|
if ("pcre" IN_LIST FEATURES)
|
|
|
|
set(REGEX_BACKEND pcre)
|
|
|
|
elseif ("pcre2" IN_LIST FEATURES)
|
|
|
|
set(REGEX_BACKEND pcre2)
|
|
|
|
else()
|
|
|
|
set(REGEX_BACKEND builtin)
|
|
|
|
endif()
|
|
|
|
|
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
|
2020-03-12 00:16:42 +08:00
|
|
|
-DREGEX_BACKEND=${REGEX_BACKEND}
|
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)
|
|
|
|
|
2020-04-17 03:03:13 +08:00
|
|
|
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|