diff options
| author | Billy Robert O'Neal III <bion@microsoft.com> | 2020-08-28 16:31:27 -0700 |
|---|---|---|
| committer | Billy Robert O'Neal III <bion@microsoft.com> | 2020-08-28 16:31:27 -0700 |
| commit | c828f3634723996e6031fb2e3c3d1ac3f4de0cad (patch) | |
| tree | b3fe00a043d5b9351868a0d1f8aead41bb52d2be /ports/libusb | |
| parent | 6635a2fa596ca457565eebc2a45664309cd24d77 (diff) | |
| parent | f3f329a048eaff759c1992c458f2e12351486bc7 (diff) | |
| download | vcpkg-update-geos-381.tar.gz vcpkg-update-geos-381.zip | |
Merge remote-tracking branch 'origin/master' into HEADupdate-geos-381
Diffstat (limited to 'ports/libusb')
| -rw-r--r-- | ports/libusb/CONTROL | 2 | ||||
| -rw-r--r-- | ports/libusb/portfile.cmake | 2 | ||||
| -rw-r--r-- | ports/libusb/usage | 5 | ||||
| -rw-r--r-- | ports/libusb/vcpkg-cmake-wrapper.cmake | 10 |
4 files changed, 18 insertions, 1 deletions
diff --git a/ports/libusb/CONTROL b/ports/libusb/CONTROL index accbf3d0e..c2a965331 100644 --- a/ports/libusb/CONTROL +++ b/ports/libusb/CONTROL @@ -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 diff --git a/ports/libusb/portfile.cmake b/ports/libusb/portfile.cmake index 74a592f41..c8d49f1c8 100644 --- a/ports/libusb/portfile.cmake +++ b/ports/libusb/portfile.cmake @@ -57,4 +57,6 @@ else() vcpkg_install_make() endif() +configure_file(${CURRENT_PORT_DIR}/usage ${CURRENT_PACKAGES_DIR}/share/${PORT}/usage @ONLY) +file(INSTALL ${CURRENT_PORT_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/libusb/usage b/ports/libusb/usage new file mode 100644 index 000000000..de236d46a --- /dev/null +++ b/ports/libusb/usage @@ -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})
diff --git a/ports/libusb/vcpkg-cmake-wrapper.cmake b/ports/libusb/vcpkg-cmake-wrapper.cmake new file mode 100644 index 000000000..8f0f35811 --- /dev/null +++ b/ports/libusb/vcpkg-cmake-wrapper.cmake @@ -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})
|
