Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to use system-installed ImGui and ImPlot dependencies #72

Open
jeongseok-meta opened this issue Jan 23, 2025 · 2 comments
Open

Comments

@jeongseok-meta
Copy link

Hello, I'm working on adding this package to a package manager (like vsg-dev/VulkanSceneGraph#1375). One issue with it is that vsgImGui uses its dependencies (imgui and implot) via git submodules and assumes specific locations of them when including the dependency headers:

#include "../imgui/backends/imgui_impl_vulkan.h"

However, building with their dependencies in this way (vendoring) is not recommended, as it can lead to conflicts when the package's dependencies and the vendored ones are different.

I guess the submodule was chosen because it's convenient in many ways, but would you accept PRs that enable vsgImGui to use system-installed dependencies optionally? Here's what I'm thinking of:

option(VSG_IMGUI_USE_SYSTEM_IMGUI "Use system installed ImGui" OFF)
if(VSG_IMGUI_USE_SYSTEM_IMGUI)
  find_package(ImGui CONFIG REQUIRED)
else()
  # the current logic but the header include is the same as when the dependency is installed system-wide
endif()
@robertosfield
Copy link
Collaborator

I have been considering dropping the submodule approach now like ImGui and ImPlot are better supported in 3rd party package managers, making it optional would be a good first step.

@jeongseok-meta
Copy link
Author

Good to know that! Feel free to review #73 when you have a chance. I've drafted a minimal change for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants