Skip to content

Commit

Permalink
[kcp] Add new port (#8278)
Browse files Browse the repository at this point in the history
* [kcp] Add new port

* [kcp] Remove patch
  • Loading branch information
myd7349 authored and vicroms committed Oct 8, 2019
1 parent bb578e9 commit b2f2d89
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ports/kcp/CONTROL
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Source: kcp
Version: 2019-09-20
Description: A fast and reliable ARQ protocol
Homepage: https://github.com/skywind3000/kcp
30 changes: 30 additions & 0 deletions ports/kcp/portfile.cmake
Original file line number Diff line number Diff line change
@@ -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})

0 comments on commit b2f2d89

Please sign in to comment.