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 committed 2026-02-25 07:26:10 +01:00
1 parent 3cea68c2e5
commit c6411a2952
3 files changed
+21 -5

No files matched your search

+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)