[libusb] Bump to 1.0.26.11791 (#30335)

* [libusb] Bump to 1.0.26.11791

* update version database

* fix windows build

* update version database

* Fix x64-windows-static-md

* update version database

---------

Co-authored-by: Monica <v-liumonica@microsoft.com>
This commit is contained in:
xiaozhuai, Weihang Ding 2023-04-05 02:06:16 +08:00 committed by GitHub
parent a6fd18c454
commit 809e9db912
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 33 additions and 32 deletions

View File

@ -6,37 +6,34 @@ set(VERSION 1.0.26)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO libusb/libusb
REF 4239bc3a50014b8e6a5a2a59df1fff3b7469543b # v1.0.26
SHA512 f07ec9ef4df555733dab9388595cd10bc87195da54f4c646478d4a0496ee7b8933de03e957c7466291c120102d8801e8b26846cb27b201bb9cbca5df03f3a6ef
REF fcf0c710ef5911ae37fbbf1b39d48a89f6f14e8a # v1.0.26.11791 2023-03-12
SHA512 0aa6439f7988487adf2a3bff473fec80b5c722a47f117a60696d2aa25c87cc3f20fb6aaca7c66e49be25db6a35eb0bb5f71ed7b211d1b8ee064c5d7f1b985c73
HEAD_REF master
)
if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
if(VCPKG_PLATFORM_TOOLSET MATCHES "v142")
set(MSVS_VERSION 2019)
elseif(VCPKG_PLATFORM_TOOLSET MATCHES "v141")
set(MSVS_VERSION 2017)
else()
set(MSVS_VERSION 2015)
endif()
function(replace_runtime_library PROJ_FILE)
if (VCPKG_CRT_LINKAGE STREQUAL static)
file(READ "${PROJ_FILE}" PROJ_CONTENT)
string(REPLACE "<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>" "<RuntimeLibrary>MultiThreaded</RuntimeLibrary>" PROJ_CONTENT "${PROJ_CONTENT}")
string(REPLACE "<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>" "<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>" PROJ_CONTENT "${PROJ_CONTENT}")
file(WRITE "${PROJ_FILE}" "${PROJ_CONTENT}")
else()
file(READ "${PROJ_FILE}" PROJ_CONTENT)
string(REPLACE "<RuntimeLibrary>MultiThreaded</RuntimeLibrary>" "<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>" PROJ_CONTENT "${PROJ_CONTENT}")
string(REPLACE "<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>" "<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>" PROJ_CONTENT "${PROJ_CONTENT}")
file(WRITE "${PROJ_FILE}" "${PROJ_CONTENT}")
endif()
endfunction(replace_runtime_library)
if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
set(LIBUSB_PROJECT_TYPE dll)
if (VCPKG_CRT_LINKAGE STREQUAL static)
file(READ "${SOURCE_PATH}/msvc/libusb_${LIBUSB_PROJECT_TYPE}_${MSVS_VERSION}.vcxproj" PROJ_FILE)
string(REPLACE "<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>" "<RuntimeLibrary>MultiThreaded</RuntimeLibrary>" PROJ_FILE "${PROJ_FILE}")
string(REPLACE "<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>" "<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>" PROJ_FILE "${PROJ_FILE}")
file(WRITE "${SOURCE_PATH}/msvc/libusb_${LIBUSB_PROJECT_TYPE}_${MSVS_VERSION}.vcxproj" "${PROJ_FILE}")
endif()
else()
set(LIBUSB_PROJECT_TYPE static)
if (VCPKG_CRT_LINKAGE STREQUAL dynamic)
file(READ "${SOURCE_PATH}/msvc/libusb_${LIBUSB_PROJECT_TYPE}_${MSVS_VERSION}.vcxproj" PROJ_FILE)
string(REPLACE "<RuntimeLibrary>MultiThreaded</RuntimeLibrary>" "<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>" PROJ_FILE "${PROJ_FILE}")
string(REPLACE "<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>" "<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>" PROJ_FILE "${PROJ_FILE}")
file(WRITE "${SOURCE_PATH}/msvc/libusb_${LIBUSB_PROJECT_TYPE}_${MSVS_VERSION}.vcxproj" "${PROJ_FILE}")
endif()
endif()
replace_runtime_library("${SOURCE_PATH}/msvc/Configuration.Base.props")
replace_runtime_library("${SOURCE_PATH}/msvc/Configuration.DynamicLibrary.props")
replace_runtime_library("${SOURCE_PATH}/msvc/Configuration.StaticLibrary.props")
# The README.md file in the archive is a symlink to README
# which causes issues with the windows MSBUILD process
@ -44,7 +41,7 @@ if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
vcpkg_install_msbuild(
SOURCE_PATH "${SOURCE_PATH}"
PROJECT_SUBPATH msvc/libusb_${LIBUSB_PROJECT_TYPE}_${MSVS_VERSION}.vcxproj
PROJECT_SUBPATH msvc/libusb_${LIBUSB_PROJECT_TYPE}.vcxproj
LICENSE_SUBPATH COPYING
)
file(INSTALL "${SOURCE_PATH}/libusb/libusb.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include/libusb-1.0")
@ -67,6 +64,6 @@ endif()
vcpkg_fixup_pkgconfig()
configure_file("${CURRENT_PORT_DIR}/usage" "${CURRENT_PACKAGES_DIR}/share/${PORT}/usage" @ONLY)
configure_file("${CURRENT_PORT_DIR}/vcpkg-cmake-wrapper.cmake" "${CURRENT_PACKAGES_DIR}/share/${PORT}/vcpkg-cmake-wrapper.cmake" @ONLY)
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
configure_file("${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" "${CURRENT_PACKAGES_DIR}/share/${PORT}/vcpkg-cmake-wrapper.cmake" @ONLY)
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING")

View File

@ -1,5 +1,5 @@
The package @PORT@:@TARGET_TRIPLET@ provides CMake targets:
libusb provides CMake targets:
find_package(@PORT@ CONFIG REQUIRED)
find_package(libusb CONFIG REQUIRED)
target_include_directories(main PRIVATE ${LIBUSB_INCLUDE_DIRS})
target_link_libraries(main PRIVATE ${LIBUSB_LIBRARIES})

View File

@ -1,7 +1,6 @@
{
"name": "libusb",
"version": "1.0.26",
"port-version": 3,
"version": "1.0.26.11791",
"description": "a cross-platform library to access USB devices",
"homepage": "https://github.com/libusb/libusb",
"license": "LGPL-2.1-or-later",

View File

@ -4581,8 +4581,8 @@
"port-version": 2
},
"libusb": {
"baseline": "1.0.26",
"port-version": 3
"baseline": "1.0.26.11791",
"port-version": 0
},
"libusb-win32": {
"baseline": "1.2.6.0",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "230bacd99c77786d65d0cfe9ba51ec472521c382",
"version": "1.0.26.11791",
"port-version": 0
},
{
"git-tree": "540652cc1251aa3894206c20296f6119da1ccea4",
"version": "1.0.26",