-
Notifications
You must be signed in to change notification settings - Fork 6.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[libusb] Add vcpkg-cmake-wrapper (#13057)
- Loading branch information
Showing
7 changed files
with
54 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index 1e0d192..aedc576 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -90,7 +90,7 @@ SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib) | ||
|
||
# dependencies | ||
FIND_PACKAGE(PkgConfig) # try find PKGConfig as it will be used if found | ||
-FIND_PACKAGE(LibUSB REQUIRED) | ||
+FIND_PACKAGE(libusb CONFIG REQUIRED) | ||
|
||
# Add includes | ||
INCLUDE_DIRECTORIES( | ||
@@ -98,7 +98,7 @@ INCLUDE_DIRECTORIES( | ||
"${MY_DIR}/include/internal" | ||
${PROJECT_BINARY_DIR} # for generated headers | ||
${LIBFREENECT2_THREADING_INCLUDE_DIR} | ||
- ${LibUSB_INCLUDE_DIRS} | ||
+ ${LIBUSB_INCLUDE_DIRS} | ||
) | ||
|
||
SET(RESOURCES_INC_FILE "${PROJECT_BINARY_DIR}/resources.inc.h") | ||
@@ -154,7 +154,7 @@ SET(SOURCES | ||
) | ||
|
||
SET(LIBRARIES | ||
- ${LibUSB_LIBRARIES} | ||
+ ${LIBUSB_LIBRARIES} | ||
${LIBFREENECT2_THREADING_LIBRARIES} | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
Source: libusb | ||
Version: 1.0.23 | ||
Port-Version: 2 | ||
Port-Version: 3 | ||
Homepage: https://github.com/libusb/libusb | ||
Description: a cross-platform library to access USB devices | ||
Supports: !uwp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
The package @PORT@:@TARGET_TRIPLET@ provides CMake targets: | ||
|
||
find_package(@PORT@ CONFIG REQUIRED) | ||
target_include_directories(main PRIVATE ${LIBUSB_INCLUDE_DIRS}) | ||
target_link_libraries(main PRIVATE ${LIBUSB_LIBRARIES}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
include(SelectLibraryConfigurations) | ||
|
||
find_path(LIBUSB_INCLUDE_DIR libusb.h PATH_SUFFIXES libusb-1.0) | ||
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 REQUIRED) | ||
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 REQUIRED) | ||
|
||
select_library_configurations(LIBUSB) | ||
|
||
set(LIBUSB_INCLUDE_DIRS ${LIBUSB_INCLUDE_DIR}) | ||
set(LIBUSB_LIBRARIES ${LIBUSB_LIBRARY}) |