Support linking with SDL2 2.0.10 (Ubuntu Focal).
The introduction of different components like SDL2::SDL2 / SDL2::SDL2main happened in https://github.com/libsdl-org/SDL/commit/dd1d8ab62c1c7d49d12e7f3f2c79b3528bc52815 (2.0.12).
Also use detection code from https://wiki.libsdl.org/SDL2/README-cmake to figure out when to link against SDL2::SDLmain.
Only tested on different versions of Ubuntu, so more testing on Windows should be done before merging.
Focal is EOL, there is no need to put effort into it IMHO.
Focal is EOL, there is no need to put effort into it IMHO.
I know (it's still in Ubuntu Pro support though) but unfortunately I still didn't get to update one of my dev machines yet so I looked into the recent linker errors.
it's still in Ubuntu Pro support though
For security patches only, not supporting the most modern libs...
The changes around SDL2main are interesting though. 👍