Giter VIP home page Giter VIP logo

imgui_cmake_wrapper's Introduction

imgui CMake Wrapper

History

While trying to setup a new C++ project with imgui using CMake I was confronted with the lack of CMake support for imgui. While cloning the imgui repository and adding the necessary sources and headers to your targets works fine and is simple to do, it feels like unnecessary struggle in the age of CMake FetchContent and CPM. In order to enable CMake support I wrote a simple wrapper configuration for the glfw + opengl3 backend combination. This is a first try at this, and is merely an effort to make my life easier the next time I want to work with imgui.

Usage

CPM

In order to use this wrapper in your project using CPM add:

include(cmake/CPM.cmake)
CPMAddPackage("gh:aosterthun/imgui_cmake_wrapper#0.0.1")

to your CMake configuration. This provides the imgui_cmake_wrapper target that can be linked to any target you want.

add_executable(${PROJECT_NAME} ${${PROJECT_NAME}_SOURCE_DIR}/${PROJECT_NAME}.cc)
target_link_libraries(${PROJECT_NAME} imgui_cmake_wrapper)

Roadmap

  • Switch from git submodules to CMake FetchContent or ExternalProject where possible for adding internal dependencies to make this more CMake native
  • Add a system for choosing which backend to build. Would be nice if this could be realized using CMakes components feature.
  • Add SDL support
  • Add Vulkan support

Contributions

If you want to support this effort and improve the existing configuration or add support for additional backends you are welcome to create a pull request.

imgui_cmake_wrapper's People

Contributors

aosterthun avatar

Watchers

 avatar

Forkers

matekdev

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.