This is a version of Dear ImGui that can be built as a static or shared library using CMake.
- Official Dear ImGui documentation: BACKENDS.md
- Original project: ocornut/imgui
Example build using CMake and Ninja:
cmake -S . -B build -G Ninja \
-DIMGUI_BACKEND=bgfx,sdl3 \
-DCMAKE_BUILD_TYPE=Release \
-DIMGUI_BUILD_SHARED=OFF \
-DCMAKE_INSTALL_PREFIX=C:/libs/imgui
cmake --build build-
IMGUI_BACKEND– Select the backend(s) to use. Currently supportssdl3andbgfx.- The bgfx backend is a custom integration, adapted from:
- Modified to support ImGui version 1.92.5
-
IMGUI_BUILD_SHARED– ON to build as a shared library, OFF for static library
Backends require their respective libraries:
- BGFX: Build manually using bgfx.cmake
- SDL3: Build manually from SDL
These libraries are not included in this repository; build them separately as needed.
A sample project using this library is available here:
sdl3-bgfx-imgui-examples