зеркало из https://github.com/microsoft/vcpkg.git
[hidapi] update to 0.11.0; switch to CMake (#20460)
This commit is contained in:
Родитель
c264dba458
Коммит
3799a5f722
|
@ -1,48 +0,0 @@
|
|||
# - try to find HIDAPI library
|
||||
# from http://www.signal11.us/oss/hidapi/
|
||||
#
|
||||
# Cache Variables: (probably not for direct use in your scripts)
|
||||
# HIDAPI_INCLUDE_DIR
|
||||
# HIDAPI_LIBRARY
|
||||
#
|
||||
# Non-cache variables you might use in your CMakeLists.txt:
|
||||
# HIDAPI_FOUND
|
||||
# HIDAPI_INCLUDE_DIRS
|
||||
# HIDAPI_LIBRARIES
|
||||
#
|
||||
# Requires these CMake modules:
|
||||
# FindPackageHandleStandardArgs (known included with CMake >=2.6.2)
|
||||
#
|
||||
# Original Author:
|
||||
# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net>
|
||||
# http://academic.cleardefinition.com
|
||||
# Iowa State University HCI Graduate Program/VRAC
|
||||
#
|
||||
# Copyright Iowa State University 2009-2010.
|
||||
# Distributed under the Boost Software License, Version 1.0.
|
||||
# (See accompanying file LICENSE_1_0.txt or copy at
|
||||
# http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
# hacking FindHIDAPI.cmake as hidapi-config.cmake
|
||||
|
||||
find_library(HIDAPI_LIBRARY
|
||||
NAMES hidapi hidapi-libusb)
|
||||
|
||||
find_path(HIDAPI_INCLUDE_DIR
|
||||
NAMES hidapi.h
|
||||
PATH_SUFFIXES
|
||||
hidapi)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(HIDAPI
|
||||
DEFAULT_MSG
|
||||
HIDAPI_LIBRARY
|
||||
HIDAPI_INCLUDE_DIR)
|
||||
|
||||
if(HIDAPI_FOUND)
|
||||
set(HIDAPI_LIBRARIES "${HIDAPI_LIBRARY}")
|
||||
|
||||
set(HIDAPI_INCLUDE_DIRS "${HIDAPI_INCLUDE_DIR}")
|
||||
endif()
|
||||
|
||||
mark_as_advanced(HIDAPI_INCLUDE_DIR HIDAPI_LIBRARY)
|
|
@ -1,70 +1,21 @@
|
|||
vcpkg_fail_port_install(ON_ARCH "arm" "arm64" ON_TARGET "uwp")
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO libusb/hidapi
|
||||
REF hidapi-0.10.1
|
||||
SHA512 0479706c631775483378070ff7170542725678eabc202a5bd07436c951fd766e01743417999ac3fb2b5436c865f6ace2cfced1f210fa3a3e88c19ceb3bbe0534
|
||||
HEAD_REF master
|
||||
PATCHES remove-duplicate-AC_CONFIG_MACRO_DIR.patch
|
||||
)
|
||||
|
||||
if(VCPKG_TARGET_IS_WINDOWS)
|
||||
file(READ "${SOURCE_PATH}/windows/hidapi.vcxproj" _contents)
|
||||
if(${VCPKG_CRT_LINKAGE} STREQUAL "dynamic")
|
||||
string(REGEX REPLACE
|
||||
"<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>"
|
||||
"<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>"
|
||||
_contents "${_contents}")
|
||||
string(REGEX REPLACE
|
||||
"<RuntimeLibrary>MultiThreaded</RuntimeLibrary>"
|
||||
"<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>"
|
||||
_contents "${_contents}")
|
||||
else()
|
||||
string(REGEX REPLACE
|
||||
"<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>"
|
||||
"<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>"
|
||||
_contents "${_contents}")
|
||||
string(REGEX REPLACE
|
||||
"<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>"
|
||||
"<RuntimeLibrary>MultiThreaded</RuntimeLibrary>"
|
||||
_contents "${_contents}")
|
||||
endif()
|
||||
|
||||
if(${VCPKG_LIBRARY_LINKAGE} STREQUAL "dynamic")
|
||||
string(REPLACE
|
||||
"<ConfigurationType>StaticLibrary</ConfigurationType>"
|
||||
"<ConfigurationType>DynamicLibrary</ConfigurationType>"
|
||||
_contents "${_contents}")
|
||||
else()
|
||||
string(REPLACE
|
||||
"<ConfigurationType>DynamicLibrary</ConfigurationType>"
|
||||
"<ConfigurationType>StaticLibrary</ConfigurationType>"
|
||||
_contents "${_contents}")
|
||||
endif()
|
||||
file(WRITE "${SOURCE_PATH}/windows/hidapi.vcxproj" "${_contents}")
|
||||
|
||||
vcpkg_install_msbuild(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PROJECT_SUBPATH windows/hidapi.vcxproj
|
||||
INCLUDES_SUBPATH hidapi ALLOW_ROOT_INCLUDES
|
||||
LICENSE_SUBPATH LICENSE-bsd.txt # use BSD license
|
||||
)
|
||||
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/hidapi-config.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
|
||||
else(VCPKG_TARGET_IS_LINUX OR VCPKG_TARGET_IS_OSX)
|
||||
vcpkg_configure_make(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
AUTOCONFIG
|
||||
)
|
||||
|
||||
vcpkg_install_make()
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
vcpkg_fixup_pkgconfig()
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
||||
endif()
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO libusb/hidapi
|
||||
REF hidapi-0.11.0
|
||||
SHA512 0de4abc963600d159ce231416c468b9e81a8361e4d2c2202988d6eb2e58a923700e9b9be639fbddc6bc14625131848409e2e88dbc4b34a1f8a726c8fa4692d92
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS -DHIDAPI_BUILD_HIDTEST=OFF
|
||||
)
|
||||
vcpkg_cmake_install()
|
||||
|
||||
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/${PORT})
|
||||
vcpkg_fixup_pkgconfig()
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
file(INSTALL "${SOURCE_PATH}/LICENSE-bsd.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
diff --git a/configure.ac b/configure.ac
|
||||
index 220909a..77da67a 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -13,7 +13,6 @@ LTLDFLAGS="-version-info ${lt_current}:${lt_revision}:${lt_age}"
|
||||
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
AM_INIT_AUTOMAKE([foreign -Wall -Werror])
|
||||
-AC_CONFIG_MACRO_DIR([m4])
|
||||
|
||||
m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
|
||||
LT_INIT
|
|
@ -1,14 +1,22 @@
|
|||
{
|
||||
"name": "hidapi",
|
||||
"version-semver": "0.10.1",
|
||||
"port-version": 2,
|
||||
"version-semver": "0.11.0",
|
||||
"description": "A Simple library for communicating with USB and Bluetooth HID devices on Linux, Mac and Windows.",
|
||||
"homepage": "https://github.com/libusb/hidapi",
|
||||
"supports": "!(arm | uwp)",
|
||||
"license": "BSD-3-Clause-Clear",
|
||||
"supports": "!uwp",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "libusb",
|
||||
"platform": "!windows"
|
||||
"platform": "!(windows | osx)"
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -2633,8 +2633,8 @@
|
|||
"port-version": 1
|
||||
},
|
||||
"hidapi": {
|
||||
"baseline": "0.10.1",
|
||||
"port-version": 2
|
||||
"baseline": "0.11.0",
|
||||
"port-version": 0
|
||||
},
|
||||
"highfive": {
|
||||
"baseline": "2.3",
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "2540911a0c10b731ac15a04c6f9c5153003c19fd",
|
||||
"version-semver": "0.11.0",
|
||||
"port-version": 0
|
||||
},
|
||||
{
|
||||
"git-tree": "8ddfc714e198b19f67260bfeb2e5ae58e37fd909",
|
||||
"version-semver": "0.10.1",
|
||||
|
|
Загрузка…
Ссылка в новой задаче