wxWidgets icon indicating copy to clipboard operation
wxWidgets copied to clipboard

CMake: Add joystick check and fix warning

Open MaartenBent opened this issue 3 years ago • 2 comments

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.

MaartenBent avatar Aug 04 '22 22:08 MaartenBent

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.

vadz avatar Aug 05 '22 22:08 vadz

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.

MaartenBent avatar Aug 05 '22 22:08 MaartenBent