Add SDL2_STATIC variable, when set to ON will link the static version of
SDL2 and add any necessary libs and linker flags for linking it
statically from pkg-config.
For dynamic linking, any extra stuff from pkg-config is also retrieved
and added to SDL2_LIBRARY.
The variable SDL2_DEFINITIONS is also retrieved from
pkg-config --cflags-only-other.
If pkg-config is not available, the module functions as before with no
errors, but SDL2_STATIC will probably fail.
TODO:
warn if pkg-config is not found
add similar code to the other two cmake modules, or factor it out
Add SDL2_STATIC variable, when set to ON will link the static version of SDL2 and add any necessary libs and linker flags for linking it statically from pkg-config.
For dynamic linking, any extra stuff from pkg-config is also retrieved and added to SDL2_LIBRARY.
The variable SDL2_DEFINITIONS is also retrieved from
pkg-config --cflags-only-other
.If pkg-config is not available, the module functions as before with no errors, but SDL2_STATIC will probably fail.
TODO: