Skip to content

[imgui] How to distinguish whether the imgui used is the master or dock version #39968

Open

Description

Is your feature request related to a problem? Please describe.

Now we have imgui[docking-experimental] which is dock version of imgui. This means that dock is a feature of imgui. But as far as I understand, imgui-dock is not based on imgui.

Regardless of whether I use imgui or not, I always set it like this:

find_package(imgui REQUIRED)
...
target_link_libraries(${component} INTERFACE
    imgui::imgui
    )

Linking code based on master version to dock version will result in an error.

Proposed solution

Can the package provide the "IMGUI_DOCK_USED" compilation option so that I can use macro definitions in the code for judgment or provide a judgment function when cmake find_package?

Describe alternatives you've considered

No response

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

category:port-featureThe issue is with a library, which is requesting new capabilities that didn’t exist

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions