vcpkg/ports/libusb/vcpkg-cmake-wrapper.cmake
Alexander Neumann 16a892c1fb
Single config fixes 2. (#27406)
* freerdp fix single config

* libassuan fix single config builds

* libcanberra fix single config build

* libmysql fix single config builds

* libobd fix single config

* libusb allow single config wrapper

* nmap single config cleanup

* spdk single config stuff

* zeroc-ice fix single config

* zopfli single config fix

* use version date

* v db

* Revert unchanged libodb-pgsql port-version bump.

Co-authored-by: Billy O'Neal <bion@microsoft.com>
2022-10-26 10:55:31 -07:00

14 lines
617 B
CMake

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)
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)
select_library_configurations(LIBUSB)
set(LIBUSB_INCLUDE_DIRS "${LIBUSB_INCLUDE_DIR}")
if (@VCPKG_TARGET_IS_LINUX@)
list(APPEND LIBUSB_LIBRARIES udev)
endif()