[usbipdcpp] New port: A C++ library for creating usbip servers#50973
[usbipdcpp] New port: A C++ library for creating usbip servers#50973yunsmall wants to merge 1 commit intomicrosoft:masterfrom
Conversation
|
@microsoft-github-policy-service agree |
8b46118 to
1da552a
Compare
| "coroutine": { | ||
| "description": "Use C++20 coroutine-based implementation" | ||
| }, |
9a83e2d to
6ae4cd9
Compare
|
@vicroms Thank you for the review! I've made the following changes:
Regarding whether coroutine is an alternative: It's not a mutually exclusive alternative but an internal implementation detail (similar to bullet3's double/single precision feature), which is transparent to users. Also added a busywait feature for lower latency mode. |
6599ac3 to
065535f
Compare
dg0yt
left a comment
There was a problem hiding this comment.
FTR there is PR template for new ports, with a checklist.
ports/usbipdcpp/portfile.cmake
Outdated
| vcpkg_cmake_configure( | ||
| SOURCE_PATH "${SOURCE_PATH}" | ||
| OPTIONS | ||
| -DPKG_CONFIG_EXECUTABLE="${PKGCONFIG}" |
There was a problem hiding this comment.
Quote for CMake language.
| -DPKG_CONFIG_EXECUTABLE="${PKGCONFIG}" | |
| "-DPKG_CONFIG_EXECUTABLE=${PKGCONFIG}" |
ports/usbipdcpp/usage
Outdated
| The package usbipdcpp provides CMake targets: | ||
|
|
||
| find_package(usbipdcpp CONFIG REQUIRED) | ||
| target_link_libraries(main PRIVATE usbipdcpp::usbipdcpp usbipdcpp::libusb) No newline at end of file |
There was a problem hiding this comment.
Align with heuristical output from vcpkg's tool.
| The package usbipdcpp provides CMake targets: | |
| find_package(usbipdcpp CONFIG REQUIRED) | |
| target_link_libraries(main PRIVATE usbipdcpp::usbipdcpp usbipdcpp::libusb) | |
| usbipdcpp provides CMake targets: | |
| find_package(usbipdcpp CONFIG REQUIRED) | |
| target_link_libraries(main PRIVATE usbipdcpp::usbipdcpp usbipdcpp::libusb) |
Do users really need to add/use two targets?
libusb seems to be optional. Is usbipdcpp::libusb an actual artifact or just representing the external libusb?
There was a problem hiding this comment.
usbipdcpp::libusb is an actual artifact (a static library usbipdcpp_libusb), not just a wrapper for external libusb. It contains the libusb-based server implementation code.
The structure is:
usbipdcpp::usbipdcpp- base library (always built)usbipdcpp::libusb- optional component with libusb server implementation (only built whenlibusbfeature is enabled)
Users need to link both targets when using the libusb feature because usbipdcpp::libusb depends on usbipdcpp::usbipdcpp and provides additional functionality for physical USB device forwarding.
|
@dg0yt Thank you for the review! I've applied all the suggested changes:
Regarding the two targets: |
Summary
This PR adds a new port for usbipdcpp, a C++ library for creating USB/IP servers.
Features
Features available
coroutine: Use C++20 coroutine-based implementationlibusb: Build libusb-based server components for physical USB device forwardingUsage