[libusb] Add disable-udev feature (#35328)

* [libusb] Add disable-udev feature

* fix commented problems. Comments still to be removed

* Update libusb port version

* Updated libusb port-version

* Remove commented lines

* Update version database

* Update version database

* fix suggestion to portfile.cmake
This commit is contained in:
simolis3 2023-11-29 08:56:17 +02:00 committed by GitHub
parent 8b4801fb4a
commit cabba0d037
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 30 additions and 6 deletions

View File

@ -41,9 +41,18 @@ if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libusb-1.0.pc" " -lusb-1.0" " -llibusb-1.0")
endif()
else()
vcpkg_list(SET MAKE_OPTIONS)
vcpkg_list(SET LIBUSB_LINK_LIBRARIES)
if("udev" IN_LIST FEATURES)
vcpkg_list(APPEND MAKE_OPTIONS "--enable-udev")
vcpkg_list(APPEND LIBUSB_LINK_LIBRARIES udev)
else()
vcpkg_list(APPEND MAKE_OPTIONS "--disable-udev")
endif()
vcpkg_configure_make(
SOURCE_PATH "${SOURCE_PATH}"
AUTOCONFIG
OPTIONS ${MAKE_OPTIONS}
)
vcpkg_install_make()
endif()

View File

@ -8,9 +8,7 @@ select_library_configurations(LIBUSB)
set(LIBUSB_INCLUDE_DIRS "${LIBUSB_INCLUDE_DIR}")
if (@VCPKG_TARGET_IS_LINUX@)
list(APPEND LIBUSB_LIBRARIES udev)
endif()
list(APPEND LIBUSB_LIBRARIES @LIBUSB_LINK_LIBRARIES@)
if (@VCPKG_TARGET_IS_OSX@)
list(APPEND LIBUSB_LIBRARIES "-framework Cocoa")

View File

@ -1,7 +1,7 @@
{
"name": "libusb",
"version": "1.0.26.11791",
"port-version": 3,
"port-version": 4,
"description": "a cross-platform library to access USB devices",
"homepage": "https://github.com/libusb/libusb",
"license": "LGPL-2.1-or-later",
@ -12,5 +12,17 @@
"host": true,
"platform": "windows"
}
]
],
"default-features": [
{
"name": "udev",
"platform": "linux"
}
],
"features": {
"udev": {
"description": "Enable udev",
"supports": "linux"
}
}
}

View File

@ -4954,7 +4954,7 @@
},
"libusb": {
"baseline": "1.0.26.11791",
"port-version": 3
"port-version": 4
},
"libusb-win32": {
"baseline": "1.2.6.0",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "1e6400f24988b86ad461447df4eef8efc56a919f",
"version": "1.0.26.11791",
"port-version": 4
},
{
"git-tree": "d286a5e0a74eda464b96375fe35cba969dfc2545",
"version": "1.0.26.11791",