aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/libusb-win32
diff options
context:
space:
mode:
authorEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
committerEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
commit54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch)
treed915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/libusb-win32
move to own git serverHEADmaster
Diffstat (limited to 'vcpkg/ports/libusb-win32')
-rw-r--r--vcpkg/ports/libusb-win32/CMakeLists.txt29
-rw-r--r--vcpkg/ports/libusb-win32/portfile.cmake18
-rw-r--r--vcpkg/ports/libusb-win32/vcpkg.json14
3 files changed, 61 insertions, 0 deletions
diff --git a/vcpkg/ports/libusb-win32/CMakeLists.txt b/vcpkg/ports/libusb-win32/CMakeLists.txt
new file mode 100644
index 0000000..90e2870
--- /dev/null
+++ b/vcpkg/ports/libusb-win32/CMakeLists.txt
@@ -0,0 +1,29 @@
+cmake_minimum_required(VERSION 3.5)
+project(libusb-win32)
+
+set(lib_headers src/lusb0_usb.h)
+
+set(lib_srcs src/descriptors.c
+ src/error.c
+ src/install.c
+ src/registry.c
+ src/usb.c
+ src/windows.c
+ src/resource.rc
+ libusb0.def)
+
+add_library(libusb0 ${lib_srcs})
+target_include_directories(libusb0 PRIVATE "src/driver")
+target_link_libraries(libusb0 setupapi)
+target_compile_definitions(libusb0 PRIVATE LOG_APPNAME="libusb-dll")
+set_target_properties(libusb0 PROPERTIES PREFIX "" IMPORT_PREFIX "")
+
+install(
+ TARGETS libusb0
+ RUNTIME DESTINATION bin
+ ARCHIVE DESTINATION lib
+ LIBRARY DESTINATION lib)
+
+install(
+ FILES ${lib_headers}
+ DESTINATION include) \ No newline at end of file
diff --git a/vcpkg/ports/libusb-win32/portfile.cmake b/vcpkg/ports/libusb-win32/portfile.cmake
new file mode 100644
index 0000000..ef490bc
--- /dev/null
+++ b/vcpkg/ports/libusb-win32/portfile.cmake
@@ -0,0 +1,18 @@
+vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO mcuee/libusb-win32
+ REF "release_${VERSION}"
+ SHA512 a3dd4f65e21c26892a21342b990f40a9628759a58e76f8c65131633f279ff80a09b282eb247f282af2310f8a46d545e35b435992983ef8f3eada623ff0747e76
+ HEAD_REF master
+)
+file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}/libusb")
+
+vcpkg_cmake_configure(SOURCE_PATH "${SOURCE_PATH}/libusb")
+vcpkg_cmake_install()
+vcpkg_copy_pdbs()
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
+
+vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/libusb/COPYING_LGPL.txt")
diff --git a/vcpkg/ports/libusb-win32/vcpkg.json b/vcpkg/ports/libusb-win32/vcpkg.json
new file mode 100644
index 0000000..661c1bd
--- /dev/null
+++ b/vcpkg/ports/libusb-win32/vcpkg.json
@@ -0,0 +1,14 @@
+{
+ "name": "libusb-win32",
+ "version": "1.4.0.0",
+ "description": "Allows user space applications to access many USB device on Windows.",
+ "homepage": "https://github.com/mcuee/libusb-win32",
+ "license": "LGPL-3.0-only",
+ "supports": "windows & !uwp & !xbox & !(static & staticcrt)",
+ "dependencies": [
+ {
+ "name": "vcpkg-cmake",
+ "host": true
+ }
+ ]
+}