https://github.com/franneck94/imguiprojecttemplate
ImGui Template with OpenGL and GLFW
https://github.com/franneck94/imguiprojecttemplate
cmake cpp imgui template
Last synced: about 1 year ago
JSON representation
ImGui Template with OpenGL and GLFW
- Host: GitHub
- URL: https://github.com/franneck94/imguiprojecttemplate
- Owner: franneck94
- License: mit
- Created: 2022-04-03T09:41:52.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2024-11-26T16:40:56.000Z (over 1 year ago)
- Last Synced: 2025-02-28T08:33:49.015Z (about 1 year ago)
- Topics: cmake, cpp, imgui, template
- Language: CMake
- Homepage:
- Size: 6.91 MB
- Stars: 23
- Watchers: 3
- Forks: 11
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Template For C++ Projects



This is a template for C++ projects. What you get:
This is a template for Imgui C++ projects. What you get:
- Library and executable code separated in distinct folders.
- Use of modern CMake for building and compiling.
- External libraries:
- All graphical and imgui related libs via Git submodules:
- GLFW, Imgui and Implot
- General purpose libraries via CMake FetchContent:
- [JSON](https://github.com/nlohmann/json), [cxxopts](https://github.com/jarro2783/cxxopts) and [fmt](https://github.com/fmtlib/fmt)
- Continuous integration testing with Github Actions and [pre-commit](https://pre-commit.com/)
- Code documentation with [Doxygen](https://doxygen.nl/) and [Github Pages](https://franneck94.github.io/CppProjectTemplate/)
- Tooling: Clang-Format, Cmake-Format, Clang-tidy, Sanitizers
## Structure
``` text
├── CMakeLists.txt
├── app
│ ├── CMakesLists.txt
│ └── main.cc
├── cmake
│ └── cmake modules
├── docs
│ ├── Doxyfile
│ └── html/
├── external
│ ├── CMakesLists.txt
│ ├── ...
├── src
│ ├── CMakesLists.txt
└── ─── render/...
```
Library code goes into [src/](src/), main program code in [app/](app).
## Software Requirements
- CMake 3.21+
- GNU Makefile
- Doxygen
- VCPKG
- MSVC 2017 (or higher), G++9 (or higher), Clang++9 (or higher)
## Building
First, clone this repo and do the preliminary work:
```shell
git clone --recursive https://github.com/franneck94/ImGuiProjectTemplate
mkdir build
```
- App Executable
```shell
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
cmake --build . --config Release --target main
cd app
./main
```
- Documentation
```shell
cd build
cmake -DCMAKE_BUILD_TYPE=Debug ..
cmake --build . --config Debug --target docs
```