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.
cURL tries to find ZSTD anyways due to the lack of setting it in CACHE, and for both ZLIB and ZSTD if we had done find_package previously, cURL would still use ZLIB/ZSTD regardless of the set variable.
This also fixes the CMake build on Windows, since it would fail to find our target defined in Externals and would fall back to trying to redefine it, which produces an error.
This is a very small libary, and as I understand it, it was more or less
developed for Dolphin.
This moves the two relevant files from Externals to Common, changes the
namespace to Common, reformats the code, and adds Dolphin copyright
notices. The change in copyright notice and license was approved by
AdmiralCurtiss.
Notable changes:
- CMake
- Fixed a bug where SDL couldn't use a vendored libusb or libhidapi (see 29b3fcfb1b)
- Fixed long startup times on Windows when some non-compliant input devices are present
- Controller support
- Added support for the Razer Raiju V5 Pro
- Improved Switch 2 controller support
- Improved NVIDIA SHIELD controller support
- Fixed various controllers showing up twice on macOS
- Fixed handling GameCube adapters in PC mode on Linux and macOS
If using CMake and Ninja or any CMake generator that isn't Visual Studio on Windows, the `-include` will be ignored and the implot fix will not be applied.
The cpp-ipc dependency was included in #13870; it was overlooked that
`install()` commands in the library would lead to ancillary files being
installed along side Dolphin on Linux.
`EXCLUDE_FROM_ALL` is now set in the `add_subdirectory()` call to
prevent cpp-ipc from being part of the installation.
In particular, the following files should no longer be seen in the build
logs or in the final builds:
```
-- Installing: /app/include/libipc
-- Installing: /app/include/libipc/condition.h
-- Installing: /app/include/libipc/buffer.h
-- Installing: /app/include/libipc/export.h
-- Installing: /app/include/libipc/def.h
-- Installing: /app/include/libipc/rw_lock.h
-- Installing: /app/include/libipc/shm.h
-- Installing: /app/include/libipc/mutex.h
-- Installing: /app/include/libipc/pool_alloc.h
-- Installing: /app/include/libipc/ipc.h
-- Installing: /app/include/libipc/semaphore.h
-- Installing: /app/lib/libipc.a
-- Installing: /app/share/cpp-ipc/cpp-ipc-targets.cmake
-- Installing: /app/share/cpp-ipc/cpp-ipc-targets-release.cmake
-- Installing: /app/share/cpp-ipc/cpp-ipc-config.cmake
-- Installing: /app/share/cpp-ipc/cppIpcConfigVersion.cmake
```
The bug in CVE-2025-0665 causes crashes on Android 11 and above, as the default fdsan behavior was changed to abort when a violation is found.
While curl 8.17.0 is the latest release, we can't upgrade to it right now due to mbedtls 2.28.0 (which we are currently using) being incompatible with it.
Co-Authored-By: OatmealDome <OatmealDome@users.noreply.github.com>