/udemy-ImGuiProjectTemplate

ImGui Template with OpenGL and GLFW

Primary LanguageCMakeMIT LicenseMIT

Template For C++ Projects

C++ License

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:

Structure

├── CMakeLists.txt
├── app
│   ├── CMakesLists.txt
│   └── main.cc
├── cmake
│   └── cmake modules
├── external
│   ├── CMakesLists.txt
│   └── ...
└── src
    ├── CMakesLists.txt
    ├── my_lib.h
    └── my_lib.cc
   

Library code goes into src/, main program code in app/.

Software Requirements

  • CMake 3.16+
  • 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/ImGuiProjectTemplate.git
  • App Executable
cd build
cmake  ..
cmake --build . --target main
cd bin
./main