Skip to content
/ gui_project_cpp Public template

C++ GUI project using ImGui-SFML handled by conan.

License

Notifications You must be signed in to change notification settings

spjuanjoc/gui_project_cpp

Repository files navigation

gui_project_cpp

GUI project in C++ using ImGui-SFML.

Pipeline Status
Actions linux

Install dependencies with Conan

This configuration is required for conan version lower than 2.0. That version still lacks the migration of some libraries related to ImGui and SFML.

  1. Set up the bincrafters repository for the ImGui+SFML package

    conan config set general.revisions_enabled=1
    conan remote add bincrafters https://bincrafters.jfrog.io/artifactory/api/conan/public-conan

Requirements

Tool Version
GCC >= 8.3.0
Clang >= 7.0.0
MSVC >= 14.16
Conan 1.61.0

Install dependencies for Linux

  1. Install extra packages required for ImGui and SFML in Linux:

    conan profile update conf.tools.system.package_manager:mode=install default
    
    sudo apt install -y \
      libudev-dev                       \
      pkg-config                        \
      libgl1-mesa-dev                   \
      xorg-dev                          \
      libxcb-render-util0-dev           \
      libxcb-xkb-dev                    \
      libxcb-icccm4-dev                 \
      libxcb-image0-dev                 \
      libxcb-keysyms1-dev               \
      libxcb-xinerama0-dev              \
      libx11-xcb-dev                    \
      libxcb-randr0-dev                 \
      libxcb-shape0-dev                 \
      libxcb-sync-dev                   \
      libxcb-xfixes0-dev                \
      libxcb-dri3-dev                   \
      libxcb-cursor-dev                 \
      libxcb-util0-dev

Compilation

  1. Build

    cmake -DCMAKE_MODULE_PATH=$PWD \ 
          -DCMAKE_BUILD_TYPE=Debug \ 
          -DCMAKE_C_COMPILER=gcc-8 -DCMAKE_CXX_COMPILER=g++-8 .. 
    cmake --build ./ -- -j8 
  2. Run

    ./build/gui_project_cpp

The expected output is the following main window

The window shown when run with no modifications

spdlog and fmt::format

See about spdlog

Notes

To install conan:

sudo pip3 install conan==1.61.0

To install ninja:

pip install --user ninja

About

C++ GUI project using ImGui-SFML handled by conan.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published