Skip to content

Unflexible include path of imgui (imGuIZMO.quat v3.0) #5

@moritz-h

Description

@moritz-h

This library makes the assumption that the imgui headers are within an imgui directory.

#ifdef IMGUIZMO_USE_ImGui_FOLDER
    #include <ImGui/imgui.h>
    #include <ImGui/imgui_internal.h>
#else
    #include <imgui/imgui.h>
    #include <imgui/imgui_internal.h>
#endif

I think that is a very unflexible assumption. The imgui library itself does not have any default given in how and where to install the header files, also the official examples does not assume an imgui directory (https://github.com/ocornut/imgui/blob/v1.75/examples/example_glfw_opengl3/main.cpp). It would be nice to be able to use this library without assuming this directory structure. And as you can see you already added some kind of define wrapper, because there is no default. I think it would be more clear to let the build system define where the imgui headers are located by defining the correct include path. Then there would be no define needed and you can just do #include <imgui.h>.

Otherwise if you like to keep the current state it would be at least nice to add an extra define to choose no imgui directory in the include path:

#ifdef IMGUIZMO_USE_NO_FOLDER
    #include <imgui.h>
    #include <imgui_internal.h>
#elif defined(IMGUIZMO_USE_ImGui_FOLDER)
    #include <ImGui/imgui.h>
    #include <ImGui/imgui_internal.h>
#else
    #include <imgui/imgui.h>
    #include <imgui/imgui_internal.h>
#endif

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions