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
Add support for compilation on x64 toolchain (x86 cl.exe was running out of heap space in vm.cpp)
Also took the opportunity to change compile optimisation from /Ox to /O2, as /O2 provides better optimisation than does /Ox
Also, we shouldn't be explicitely setting compiler tool defines (__cpp_lib_bitops), so remove that from types.h
- Added support for current default toolset, explitly specified c++17 standard and 8.1 win sdk.
- properties were defined via `common_default.props` and `common_default_macros.props`
Note: There are 2 files because some properties need to be imported before `Microsoft.Cpp.Default.props` , but other common properties can be imported after but they require marco defined in `Microsoft.Cpp.Default.props`.
- Added hidapi and libusb project files to repository to simplify msbuild changes.