[kcp] Add new port (#8278)

* [kcp] Add new port

* [kcp] Remove patch
This commit is contained in:
myd7349 2019-10-08 10:15:32 +08:00 committed by Victor Romero
parent bb578e90af
commit b2f2d89607
2 changed files with 34 additions and 0 deletions

4
ports/kcp/CONTROL Normal file
View File

@ -0,0 +1,4 @@
Source: kcp
Version: 2019-09-20
Description: A fast and reliable ARQ protocol
Homepage: https://github.com/skywind3000/kcp

30
ports/kcp/portfile.cmake Normal file
View File

@ -0,0 +1,30 @@
include(vcpkg_common_functions)
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO skywind3000/kcp
REF 4c58607c917c2a82bf116489c3eb89e4e9aa696d
SHA512 6689d6c2393eb96bba276de90aec584dae9da0dad5c7bd15519bc61de16de9123e19a945a9e29c5b5cc88bf844ebfb9681b27eb425e3a59a354f13488516cdcc
HEAD_REF master
)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DBUILD_TESTING=OFF
)
vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT})
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
# Handle copyright
configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY)
# CMake integration test
vcpkg_test_cmake(PACKAGE_NAME ${PORT})