Skip to content

Commit 8903533

Browse files
committed
[usbipdcpp] New port: A C++ library for creating usbip servers
1 parent baababd commit 8903533

2 files changed

Lines changed: 72 additions & 0 deletions

File tree

ports/usbipdcpp/portfile.cmake

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
vcpkg_from_github(
2+
OUT_SOURCE_PATH SOURCE_PATH
3+
REPO yunsmall/usbipdcpp
4+
REF "v${VERSION}"
5+
SHA512 9ff6592dc723deeac864fb3eac90143888db678619a8c819e0ec588822a6f8f57613ef4e93ab37c2bfce757687b1700834c397db1283125d7de956f7f438621b
6+
HEAD_REF main
7+
)
8+
9+
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
10+
FEATURES
11+
coroutine USBIPDCPP_USE_COROUTINE
12+
libusb USBIPDCPP_BUILD_LIBUSB_COMPONENTS
13+
busywait USBIPDCPP_ENABLE_BUSY_WAIT
14+
virtual-device USBIPDCPP_BUILD_VIRTUAL_DEVICE
15+
)
16+
17+
vcpkg_find_acquire_program(PKGCONFIG)
18+
19+
vcpkg_cmake_configure(
20+
SOURCE_PATH "${SOURCE_PATH}"
21+
OPTIONS
22+
"-DPKG_CONFIG_EXECUTABLE=${PKGCONFIG}"
23+
-DUSBIPDCPP_BUILD_EXAMPLES=OFF
24+
-DUSBIPDCPP_BUILD_TESTS=OFF
25+
${FEATURE_OPTIONS}
26+
MAYBE_UNUSED_VARIABLES
27+
PKG_CONFIG_EXECUTABLE
28+
)
29+
30+
vcpkg_cmake_install()
31+
32+
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/usbipdcpp)
33+
34+
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
35+
36+
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")

ports/usbipdcpp/vcpkg.json

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"name": "usbipdcpp",
3+
"version": "0.0.1",
4+
"description": "A C++ library for creating usbip servers",
5+
"homepage": "https://github.com/yunsmall/usbipdcpp",
6+
"license": "Apache-2.0",
7+
"dependencies": [
8+
"asio",
9+
"spdlog",
10+
{
11+
"name": "vcpkg-cmake",
12+
"host": true
13+
},
14+
{
15+
"name": "vcpkg-cmake-config",
16+
"host": true
17+
}
18+
],
19+
"features": {
20+
"coroutine": {
21+
"description": "Use C++20 coroutine-based implementation"
22+
},
23+
"libusb": {
24+
"description": "Build libusb-based server components for physical USB device forwarding",
25+
"dependencies": [
26+
"libusb"
27+
]
28+
},
29+
"busywait": {
30+
"description": "Enable busy-wait mode for lower latency (incompatible with coroutine)"
31+
},
32+
"virtual-device": {
33+
"description": "Build virtual device components for creating software-emulated USB devices"
34+
}
35+
}
36+
}

0 commit comments

Comments
 (0)