This is an example ImGui project working in CMake, tested on Linux and I will add Windows support later.
  • C++ 72.7%
  • C 24%
  • Objective-C++ 2.1%
  • CMake 0.8%
  • Objective-C 0.2%
  • Other 0.1%
Find a file
2026-08-15 00:01:57 -04:00
dependencies Add project verison, and version info to CMake 2026-08-10 00:43:04 -04:00
fonts Refactor project, move ImGui setup around 2026-08-09 12:51:27 -04:00
lib Add missing submodules from last commit 2026-08-15 00:01:57 -04:00
scripts Change lua to using a custom build 2026-08-10 19:02:45 -04:00
src Add Docker support for project 2026-08-15 00:00:20 -04:00
.dockerignore Add Docker support for project 2026-08-15 00:00:20 -04:00
.gitignore Add serial port testing with ESP32 2026-08-14 16:36:55 -04:00
.gitmodules Add Docker support for project 2026-08-15 00:00:20 -04:00
CMakeLists.txt Add Docker support for project 2026-08-15 00:00:20 -04:00
Dockerfile Add Docker support for project 2026-08-15 00:00:20 -04:00
LICENSE Initial commit 2026-08-08 20:37:07 -04:00
Readme.md Add Docker support for project 2026-08-15 00:00:20 -04:00

ImGui CMake

This will be a test with ImGui and CMake using custom fonts, and has only been tested on PopOS 24.04 but should run on just about any Debian based distro.

I will be making a Windows build for this project later on, and setting up a Docker image in the future for easier building.

This is using OpenGL3, and GLFW.

Required packages for Linux, there are probably more that are required, I am just not sure.

  • build-essential
  • cmake
  • gcc
  • g++
  • libglew-dev
  • libglfw3-dev
  • libglfw3
  • libc6-dev
  • libfreetype6-dev
  • libspdlog-dev - Required for spdlog

I have made a fork of the Lua project that I was working with to modify the linit.c file to disable the debug, io, and os modules.

My fork of Lua is located here

Building

To build this project:

  1. Setup the CMake files
cmake -B build
  1. Build the project
cmake --build build --parallel
  1. Copy the fonts folder into the same directory as ImGui, I will automate this with CMake later.

Docker

I have added Docker support for this project.

To build this project with Docker

docker build -t imgui-cmake:1.0a .

To view built project files with Docker

docker run --rm -it imgui-cmake:1.0a /bin/bash

Credits

Originally from this Gist

Another gist here that might work for this

Credit to user-grinch on GitHub for the ImGui menu style and fonts

The CMake Lua build that I forked.

The LuaBridge library that I am using

License

This project is licensed under the MIT license.