2020-08-26 09:52:55 +08:00
|
|
|
include(SelectLibraryConfigurations)
|
|
|
|
|
|
|
|
find_path(LIBUSB_INCLUDE_DIR libusb.h PATH_SUFFIXES libusb-1.0)
|
2022-10-27 01:55:31 +08:00
|
|
|
find_library(LIBUSB_LIBRARY_DEBUG NAMES libusb-1.0 usb-1.0 NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug" NO_DEFAULT_PATH)
|
|
|
|
find_library(LIBUSB_LIBRARY_RELEASE NAMES libusb-1.0 usb-1.0 NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" NO_DEFAULT_PATH)
|
2020-08-26 09:52:55 +08:00
|
|
|
|
|
|
|
select_library_configurations(LIBUSB)
|
|
|
|
|
2022-10-27 01:55:31 +08:00
|
|
|
set(LIBUSB_INCLUDE_DIRS "${LIBUSB_INCLUDE_DIR}")
|
2021-09-11 04:41:46 +08:00
|
|
|
|
|
|
|
if (@VCPKG_TARGET_IS_LINUX@)
|
|
|
|
list(APPEND LIBUSB_LIBRARIES udev)
|
|
|
|
endif()
|
2023-02-04 06:00:28 +08:00
|
|
|
|
|
|
|
if (@VCPKG_TARGET_IS_OSX@)
|
|
|
|
list(APPEND LIBUSB_LIBRARIES "-framework Cocoa")
|
|
|
|
list(APPEND LIBUSB_LIBRARIES "-framework IOKit")
|
|
|
|
list(APPEND LIBUSB_LIBRARIES "-framework Security")
|
|
|
|
endif()
|