Skip to content

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

@jeongseok-meta

Description

@jeongseok-meta

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()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions