LibUSB: Improve library detection

Our FindLibUSB.cmake was previously entirely unused unless SDL was being built from Externals, we now rely on it again. It will use PkgConfig if applicable or fall back to looking around on the system, and more importantly it will always create an imported target.
This commit is contained in:
Joshua Vandaële
2026-02-25 07:25:29 +01:00
parent 184c6ee068
commit 3cea68c2e5
2 changed files with 19 additions and 16 deletions
+1 -3
View File
@@ -708,9 +708,7 @@ if(ENABLE_CUBEB)
endif()
if(NOT ANDROID)
dolphin_find_optional_system_library_pkgconfig(
LibUSB libusb-1.0 LibUSB::LibUSB Externals/libusb
)
dolphin_find_optional_system_library(LibUSB Externals/libusb)
add_definitions(-D__LIBUSB__)
endif()