Simple template to get started with SDL2.
This template uses cmkr together with vcpkg for frictionless cross platform dependency management with CMake.
Clone this repository and open it in your favorite IDE with CMake support (Visual Studio, CLion, Qt Creator). Everything should work out of the box.
cmake -B build
cmake --build build
Under the hood cmkr generates the CMakeLists.txt
required to build this project from the cmake.toml
file:
# Reference: https://build-cpp.github.io/cmkr/cmake-toml
[project]
name = "cmkr-sdl"
[vcpkg]
version = "2023.01.09"
packages = ["sdl2"]
[find-package.SDL2]
[target.cmkr-sdl]
type = "executable"
sources = ["src/cmkr-sdl/main.cpp"]
compile-features = ["cxx_std_11"]
link-libraries = ["SDL2::SDL2", "SDL2::SDL2main"]