externals: libusb: Link libusb statically on Linux
Turns out that this is possible. Also addresses my own review comment.
This commit is contained in:
parent
21d81ee941
commit
cfecc4f2b2
2 changed files with 17 additions and 15 deletions
|
@ -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()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue