Skip to content

Commit

Permalink
[netcpp] new port (microsoft#40245)
Browse files Browse the repository at this point in the history
Co-authored-by: MonicaLiu <[email protected]>
  • Loading branch information
index1207 and MonicaLiu0311 authored Aug 6, 2024
1 parent 07c9f1e commit 4a40554
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 0 deletions.
22 changes: 22 additions & 0 deletions ports/netcpp/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO index1207/netcpp
REF "v${VERSION}"
SHA512 5f4f99a65ce373f1712bf8fb90e5de4f9945f3467e6535e69fad49898fd8dae1fa534e27070d16557b05ee9fa4e3551900062f6c8220a2bd3b197cce82a57182
HEAD_REF release
)


vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
)

vcpkg_cmake_install()
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/netcpp PACKAGE_NAME netcpp)

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)

configure_file("${CMAKE_CURRENT_LIST_DIR}/usage" "${CURRENT_PACKAGES_DIR}/share/${PORT}/usage" COPYONLY)
4 changes: 4 additions & 0 deletions ports/netcpp/usage
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
netcpp provides CMake targets:

find_package(netcpp CONFIG REQUIRED)
target_link_libraries(main PRIVATE netcpp::netcpp)
19 changes: 19 additions & 0 deletions ports/netcpp/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "netcpp",
"version": "0.3.4",
"description": "A simple asynchronous network library",
"homepage": "https://github.com/index1207/netcpp",
"license": "MIT",
"supports": "windows",
"dependencies": [
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
},
"winsock2"
]
}
4 changes: 4 additions & 0 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -6192,6 +6192,10 @@
"baseline": "4.3.1",
"port-version": 5
},
"netcpp": {
"baseline": "0.3.4",
"port-version": 0
},
"netgen": {
"baseline": "6.2.2401",
"port-version": 2
Expand Down
9 changes: 9 additions & 0 deletions versions/n-/netcpp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "367142eff1e20648f9eda61fb0544233e255c806",
"version": "0.3.4",
"port-version": 0
}
]
}

0 comments on commit 4a40554

Please sign in to comment.