-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LibUSB: Update to upstream master (and turn off YAML_CPP_INSTALL CMake property) #8987
Conversation
Is the FreeBSD / MacOS testing required / desirable here? If someone already has a FreeBSD / MacOS build working it would be greatly appreciated if they could give this PR a test under those environments (or give me some info on how to get rpcs3 building on either platform). |
Since you're changing it to link against upstream, can you also add the ability to link against the system libusb on the nixes? It would be much appreciated towards the goal of #7961 . |
I'll have a quick look at it tonight. I suspect that we're already using pkg-config elsewhere, so it should be possible to use that to detect the existing libusb and bring in the paths (and libraries) for it... For context, our current process has libusb linked into the rpcs3 executable as a static library, and our git already includes the libusb source files.. so where does the 'binary bloat' reduction come in? the git libusb is a spent cost (it will still be a submodule brought to disk), and the rpcs3 executable will still have libusb statically linked into it... so it just seems that we expose ourselves to risk on supporting old versions of libusb (i.e. those bundled with distros), for no benefit. What am I missing? |
The idea with allowing linking against dynamic libs is it decreases rpcs3 binary size and time to compile on platforms with a libusb system library. No need to compile and keep around libusb again if it's already there. It's standard practice to use the system's libraries when possible on the unixes. |
Ahh... so we're talking about dynamic linkage. |
@hcorion I think I've got it... |
…e property) May resolve some outstanding issues around libusb/hidapi (i.e. DS4 not being released on rpcs3 shutdown etc..) or may not. Fixes three outstanding compile warnings on non-Windows OS... introduces a few more warnings in WindowsOS (issue raised upstream with libusb around WINAPI_CHECK macro) Re-ordered the 3rd party CMake so libusb is in file order above hidapi (just to have document flow match logical flow) Also took this opportunity to remove the YAML INSTALL action (by setting YAML_CPP_INSTALL to OFF) Provided capability to use system library for libusb by providing USE_SYS_LIBUSB option to CMAKE Tested under: - [X] Windows 10 2004 OS with DS4 controller - [X] Windows 10 2004 OS with GCon3 controller - [X] Linux (Mint 20) with DS4 controller
May resolve some outstanding issues around libusb/hidapi (i.e. DS4 not being released on rpcs3 shutdown etc..) or may not.
Fixes three outstanding compile warnings on non-Windows OS...
Re-ordered the 3rd party CMake so libusb is in file order above hidapi (just to have document flow match logical flow)
Also took this opportunity to remove the YAML INSTALL action (by setting YAML_CPP_INSTALL to OFF)
Provided capability to use system library for libusb by providing USE_SYS_LIBUSB option to CMAKE
The pkg-config is also used for FreeBSD now to find the dynamic library
Tested under:
Further Testing desired:- [ ] Other LibUSB devices- [ ] Testing under 'other platforms' (FreeBSD?)