From 890acfa2c001a034e0a837404118b3670305e0df Mon Sep 17 00:00:00 2001 From: lat9nq <22451773+lat9nq@users.noreply.github.com> Date: Thu, 3 Jun 2021 04:38:29 -0400 Subject: externals: libusb: Link libusb statically on Linux Turns out that this is possible. Also addresses my own review comment. --- CMakeLists.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 68d9e5f9d..97afaf1a9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -430,13 +430,13 @@ if(NOT APPLE AND NOT YUZU_USE_BUNDLED_LIBUSB) find_package(LibUSB) endif() - if (NOT LIBUSB_FOUND) - message(WARNING "libusb not found, falling back to externals") - set(YUZU_USE_BUNDLED_LIBUSB ON) - else() + if (LIBUSB_FOUND) add_library(usb INTERFACE) target_include_directories(usb INTERFACE "${LIBUSB_INCLUDE_DIRS}") target_link_libraries(usb INTERFACE "${LIBUSB_LIBRARIES}") + else() + message(WARNING "libusb not found, falling back to externals") + set(YUZU_USE_BUNDLED_LIBUSB ON) endif() endif() -- cgit v1.2.3