bazelbuild / bazel-central-registry

The central registry of Bazel modules for the Bzlmod external dependency system.
https://registry.bazel.build
Apache License 2.0
233 stars 254 forks source link

wanted: ocornut/imgui #1306

Open phaedon opened 5 months ago

phaedon commented 5 months ago

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

zaucy commented 2 months ago

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)