cmake: add option to override _any_ compile definition
This pr adds a cmake option (-DSDL_DEFINE_OVERRIDES=...) that allows to override any define present in SDL_build_config.h.
By e.g. configuring with -DSDL_DEFINE_OVERRIDES="SDL_JOYSTICK_MFI=0;SDL_VIDEO_DRIVER_X11_DYNAMIC=\"libX11.so.9\"", you can override these macros.
Important to know is that CMake will still run its detection routines. The defines are only overridden at the end, just before generating SDL_build_config.h. So this option cannot add sources to the build.
Because this option can override everything in cmake, it always emits a cmake warning. The option is aimed for developers, and for trying things out.
@slouken Is this what you have in mind?
Description
Existing Issue(s)
Fixes https://github.com/libsdl-org/SDL/issues/8534
Is it possible to take the value from the command line directly? This will solve my use case, but so did editing the generated header after the configuration. I was thinking of something that would be more intuitive and in line with the other ways people modify the cmake build process.
@madebr, did you see my question above?