Example on how to import SDL2 via CPM (CMake Package Manager) into a CMake project.
It downloads and imports CPM if not present, dowloads it. I have to do some some small tricks on CMakeLists.txt to link SDL2 into your executable correctly.
- SDL Renderer https://infinibrains.github.io/SDL2-CPM-CMake-Example/
- OPENGL Renderer https://infinibrains.github.io/SDL2-CPM-CMake-Example/opengl.html
ToDo: support https://github.com/bkaradzic/bgfx