On non-Unix, the platform selection is in platform.h, not on the command
line using the preprocessor macros from wx-config.
<wx/setup.h> relies on the platform being selected correctly, if it is
included directly, it cannot determine the correct configuration with
Visual Studio.
wxWidgets 3.1.5+ on Linux will compile with the Wayland EGL
canvas as the backend instead of the X11 backend. This requires a
version of GLEW compiled with the proper EGL defines and a different
header/code for certain parts that are X11 GLEW specific.
This introduces an in-tree version of GLEW that will be built with the
GLEW_EGL flag then statically linked into the KiCad executables when
EGL support is needed.
Swap syncs can limit the redraw rate as the screen waits for previously
issued syncs. Setting this to -1 allows for adaptive swapping
(resorting to unsynced if it falls behind) if it is supported by the
card but will fall back to unsynced (0) if the adaptive is not
supported.
Fixes https://gitlab.com/kicad/code/kicad/issues/4226