Skip to content

Why is imgui installation not intuitive?  #118

@FreePhoenix888

Description

@FreePhoenix888

Conan center shows you only this command to install imgui:

[requires]
imgui/cci.20230105+1.89.2.docking

And this command to find and link it to your app in cmake:

# ...
find_package(imgui REQUIRED)
# ...
target_link_libraries(YOUR_TARGET imgui::imgui)

But in this repo we see that we need two other libs:

glfw/3.3.6
glew/2.2.0

Bindings:
[imports]
./res/bindings, imgui_impl_glfw.cpp -> ../bindings
./res/bindings, imgui_impl_opengl3.cpp -> ../bindings
./res/bindings, imgui_impl_glfw.h -> ../bindings
./res/bindings, imgui_impl_opengl3.h -> ../bindings

Options:
[options]
glew:shared=False

Another generator(that is not showed in conan center instruction):
[generators]
cmake_find_package_multi

Use config keyword for find_package:
# CONFIG option is important so that CMake doesnt search for modules into the default modules directory
find_package(imgui CONFIG)
find_package(glfw3 CONFIG)
find_package(glew CONFIG)

And a lot of other things you can see here:
https://github.com/conan-io/examples/blob/master/libraries/dear-imgui/basic/CMakeLists.txt#L7-L10

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions