wxWidgets
wxWidgets copied to clipboard
CMake: Add joystick check and fix warning
Disable wxUSE_JOYSTICK if linux/joystick.h is not found on Linux systems. See https://github.com/wxWidgets/wxWidgets/issues/22646.
Don't use -Wno-ctor-dtor-privacy and -Woverloaded-virtual for C files, to fix 'is valid for C++/ObjC++ but not for C' warning. See https://github.com/wxWidgets/wxWidgets/issues/22696.
Also applicable to 3.2 branch.
Thanks, I agree that this is the best solution but I have one last question about this: why do we test for wxGTK here? It looks like joystick support is the same for it, wxX11 and wxQt under Unix.
That is indeed wrong. I checked where unix/joystick.cpp was included, and that is only inside an if(WXGTK) check. But only because CMake does not support wxX11 or motif. wxQt doesn't seem to use it. I'll remove the check.