From 181d5d285a3accdf1115a732a17bff300079fee3 Mon Sep 17 00:00:00 2001 From: Ethan Lee Date: Wed, 9 Aug 2023 13:55:36 -0400 Subject: [PATCH] hidapi: Enable libusb support by default. Now that we have a whitelisting system for libusb devices, it should be safe to support it whenever it's available. --- CMakeLists.txt | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d04571501..dc17ef872 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -137,14 +137,6 @@ else() set(SDL_HIDAPI_LIBUSB_AVAILABLE TRUE) endif() -# On the other hand, *BSD specifically uses libusb only, so we make a special -# case just for them. -if(FREEBSD OR NETBSD OR OPENBSD OR BSDI) - set(SDL_HIDAPI_LIBUSB_DEFAULT TRUE) -else() - set(SDL_HIDAPI_LIBUSB_DEFAULT FALSE) -endif() - set(SDL_ASSEMBLY_DEFAULT OFF) if(USE_CLANG OR USE_GCC OR USE_INTELCC OR MSVC_VERSION GREATER 1400) set(SDL_ASSEMBLY_DEFAULT ON) @@ -349,7 +341,7 @@ set_option(SDL_OFFSCREEN "Use offscreen video driver" ON) option_string(SDL_BACKGROUNDING_SIGNAL "number to use for magic backgrounding signal or 'OFF'" OFF) option_string(SDL_FOREGROUNDING_SIGNAL "number to use for magic foregrounding signal or 'OFF'" OFF) dep_option(SDL_HIDAPI "Enable the HIDAPI subsystem" ON "NOT VISIONOS" OFF) -dep_option(SDL_HIDAPI_LIBUSB "Use libusb for low level joystick drivers" ${SDL_HIDAPI_LIBUSB_DEFAULT} "SDL_HIDAPI;${SDL_HIDAPI_LIBUSB_AVAILABLE}" OFF) +dep_option(SDL_HIDAPI_LIBUSB "Use libusb for low level joystick drivers" ON SDL_HIDAPI_LIBUSB_AVAILABLE OFF) dep_option(SDL_HIDAPI_JOYSTICK "Use HIDAPI for low level joystick drivers" ON SDL_HIDAPI OFF) dep_option(SDL_VIRTUAL_JOYSTICK "Enable the virtual-joystick driver" ON SDL_HIDAPI OFF) set_option(SDL_LIBUDEV "Enable libudev support" ON)