bazel-central-registry icon indicating copy to clipboard operation
bazel-central-registry copied to clipboard

wanted: ocornut/imgui

Open phaedon opened this issue 2 years ago • 1 comments

Module location

https://github.com/ocornut/imgui

Link to bzlmod issue in the module's repository

No response

Any other context to provide?

For starters, here's the WORKSPACE rule I'm using:

http_archive(
    name = "imgui-1.86",
    build_file_content = """
cc_library(
    name = "imgui-1.86",
    srcs = [
        "backends/imgui_impl_glfw.cpp",
        "backends/imgui_impl_opengl3.cpp",
        "imgui.cpp",
        "imgui_draw.cpp",
        "imgui_tables.cpp",
        "imgui_widgets.cpp",
    ],
    hdrs = [
        "backends/imgui_impl_glfw.h",
        "backends/imgui_impl_opengl3.h",
        "backends/imgui_impl_opengl3_loader.h",
        "imconfig.h",
        "imgui.h",
        "imgui_internal.h",
        "imstb_rectpack.h",
        "imstb_textedit.h",
        "imstb_truetype.h",
    ],
    deps = [
        "@glfw-3.3.6",
        "@glfw-3.3.6//:glfw-headers",
    ],
    linkopts = ["-ldl"],
    includes = ["."],
    include_prefix = "imgui",
)
""",
    strip_prefix = "imgui-1.86",
    urls = ["https://github.com/ocornut/imgui/archive/refs/tags/v1.86.tar.gz"],
)

Fund our work

  • [ ] Sponsor our community's open source work by donating a feature bounty

phaedon avatar Jan 10 '24 14:01 phaedon

I have some BUILD files here https://github.com/zaucy/imgui if someone wants to use it as reference. It only has the dx9, dx10, dx11, dx12, and win32 backends though.

It would be nice of some of the other backends were supported, but ideally we'd have them on the BCR as well (such as SDL #929 or vulkan #1771)

zaucy avatar Apr 11 '24 15:04 zaucy