ImGuiProjectTemplate
ImGuiProjectTemplate copied to clipboard
ImGui Template with OpenGL and GLFW
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:
- Continuous integration testing with Github Actions and pre-commit
- Code documentation with Doxygen and Github Pages
- Tooling: Clang-Format, Cmake-Format, Clang-tidy, Sanitizers
Structure
├── 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/, main program code in 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:
git clone --recursive https://github.com/franneck94/CppProjectTemplate
mkdir build
- App Executable
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
cmake --build . --config Release --target main
cd app
./main
- Documentation
cd build
cmake -DCMAKE_BUILD_TYPE=Debug ..
cmake --build . --config Debug --target docs