File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ vcpkg_from_github (
2+ OUT_SOURCE_PATH SOURCE_PATH
3+ REPO yunsmall/usbipdcpp
4+ REF v0.0.1
5+ SHA512 4b70985e32469a273d4ada67193c2943283ce7e8f400f7caf0deba556bd2c26ab6990cce3e18c5b2202ca91d5538647c6eda810c6f54de72512baae56c826b9f
6+ HEAD_REF main
7+ )
8+
9+ set (OPTIONS
10+ -DUSBIPDCPP_BUILD_EXAMPLES=OFF
11+ -DUSBIPDCPP_BUILD_TESTS=OFF
12+ )
13+
14+ if ("coroutine" IN_LIST FEATURES)
15+ list (APPEND OPTIONS -DUSBIPDCPP_USE_COROUTINE=ON )
16+ else ()
17+ list (APPEND OPTIONS -DUSBIPDCPP_USE_COROUTINE=OFF )
18+ endif ()
19+
20+ if ("libusb" IN_LIST FEATURES)
21+ list (APPEND OPTIONS -DUSBIPDCPP_BUILD_LIBUSB_COMPONENTS=ON )
22+ else ()
23+ list (APPEND OPTIONS -DUSBIPDCPP_BUILD_LIBUSB_COMPONENTS=OFF )
24+ endif ()
25+
26+ vcpkg_cmake_configure (
27+ SOURCE_PATH "${SOURCE_PATH} "
28+ OPTIONS ${OPTIONS}
29+ )
30+
31+ vcpkg_cmake_install ()
32+
33+ vcpkg_cmake_config_fixup (
34+ PACKAGE_NAME usbipdcpp
35+ CONFIG_PATH lib/cmake/usbipdcpp
36+ )
37+
38+ file (REMOVE_RECURSE "${CURRENT_PACKAGES_DIR} /debug/include" )
39+
40+ vcpkg_install_copyright (FILE_LIST "${SOURCE_PATH} /LICENSE" )
41+
42+ file (INSTALL "${CMAKE_CURRENT_LIST_DIR} /usage" DESTINATION "${CURRENT_PACKAGES_DIR} /share/${PORT} " )
Original file line number Diff line number Diff line change 1+ The package usbipdcpp provides CMake targets:
2+
3+ find_package(usbipdcpp CONFIG REQUIRED)
4+ target_link_libraries(main PRIVATE usbipdcpp::usbipdcpp)
5+
6+ Features:
7+ - coroutine: Use C++20 coroutine-based implementation
8+ - libusb: Build libusb-based server components for physical USB device forwarding
9+
10+ Install with features:
11+
12+ vcpkg install usbipdcpp[coroutine]
13+ vcpkg install usbipdcpp[libusb]
14+ vcpkg install usbipdcpp[coroutine,libusb]
15+
16+ For libusb support in CMake:
17+
18+ find_package(usbipdcpp CONFIG REQUIRED COMPONENTS libusb)
19+ target_link_libraries(main PRIVATE usbipdcpp::usbipdcpp usbipdcpp::libusb)
Original file line number Diff line number Diff line change 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+ }
30+ }
You can’t perform that action at this time.
0 commit comments