SDL: Use bundled LibUSB when desirable

Previously, SDL would `find_package(libusb)` which would actually overwrite the user preference in the case where both USE_SYSTEM_LIBUSB and USE_SYSTEM_SDL were OFF. This coincidentally also allows SDL to use libusb on Windows.
This commit is contained in:
Joshua Vandaële
2026-03-17 17:29:22 -04:00
committed by OatmealDome
parent 6a22e57fe8
commit f272382cd1
3 changed files with 21 additions and 5 deletions
+5
View File
@@ -20,6 +20,11 @@ if(CCACHE_BIN)
set(CCACHE_BINARY ${CCACHE_BIN})
endif()
if(LibUSB_TYPE STREQUAL Bundled)
set(LibUSB_FOUND TRUE)
set(SDL_HIDAPI_LIBUSB_SHARED OFF)
endif()
add_subdirectory(SDL)
if (TARGET SDL3)