Sfoglia il codice sorgente

hidapi: support mingw (#4750)

* hidapi: support mingw

* libusb: update cmake script to latest commit

* improve cmake find libusb.pc

* fix find pc
star9029 1 anno fa
parent
commit
fee9f9dd31
2 ha cambiato i file con 6 aggiunte e 2 eliminazioni
  1. 5 1
      packages/h/hidapi/xmake.lua
  2. 1 1
      packages/l/libusb/xmake.lua

+ 5 - 1
packages/h/hidapi/xmake.lua

@@ -18,7 +18,11 @@ package("hidapi")
         add_deps("pkg-config")
     end
 
-    on_install("windows|x86", "windows|x64", "linux", "macosx", function (package)
+    on_install("windows|x86", "windows|x64", "linux", "macosx", "mingw", function (package)
+        io.replace("libusb/CMakeLists.txt",
+            "pkg_check_modules(libusb REQUIRED IMPORTED_TARGET libusb-1.0>=1.0.9)",
+            "pkg_check_modules(libusb REQUIRED IMPORTED_TARGET libusb)", {plain = true})
+
         local configs = {
             "-DHIDAPI_WITH_TESTS=OFF",
             "-DHIDAPI_BUILD_PP_DATA_DUMP=OFF",

+ 1 - 1
packages/l/libusb/xmake.lua

@@ -9,7 +9,7 @@ package("libusb")
     add_versions("v1.0.27", "e8f18a7a36ecbb11fb820bd71540350d8f61bcd9db0d2e8c18a6fb80b214a3de")
     add_versions("v1.0.26", "a09bff99c74e03e582aa30759cada218ea8fa03580517e52d463c59c0b25e240")
 
-    add_resources(">=1.0.26", "libusb-cmake", "https://github.com/libusb/libusb-cmake.git", "84fb1bba4dde4c266944e7c7aa641a8a15d18f31")
+    add_resources(">=1.0.26", "libusb-cmake", "https://github.com/libusb/libusb-cmake.git", "8f0b4a38fc3eefa2b26a99dff89e1c12bf37afd4")
 
     if is_plat("macosx") then
         add_frameworks("CoreFoundation", "IOKit", "Security")