A minimal C++ project demonstrating SDL3 and Dear ImGui integrated via CMake's FetchContent — no manual dependency installation required.
- Zero-setup dependencies — all libraries are fetched and built automatically at configure time
- SDL3 for windowing, rendering, and input
- Dear ImGui for immediate-mode GUI
- Single demo file showing a working render loop with ImGui widgets
- CMake ≥ 3.24
- A C++17 compiler (GCC, Clang, or MSVC)
- An internet connection (for
FetchContentto download dependencies)
cmake -B build
or
cmake -S . -B build -G "Visual Studio 18 2026" -A x64
cmake --build build./build/demoA window will open with an ImGui demo panel. Close the window to exit.
├── CMakeLists.txt
├── src/
│ └── main.cpp # Demo: SDL3 window + ImGui render loop
└── README.md
CMakeLists.txt uses FetchContent to pull:
| Dependency | Source |
|---|---|
| SDL3 | https://github.com/libsdl-org/SDL |
| Dear ImGui | https://github.com/ocornut/imgui |
Both are built as part of the project — nothing is installed system-wide.
This project is in the public domain.