diff --git a/modules/imgui/1.92.4/MODULE.bazel b/modules/imgui/1.92.4/MODULE.bazel new file mode 100644 index 00000000000..1e6a58fbcf8 --- /dev/null +++ b/modules/imgui/1.92.4/MODULE.bazel @@ -0,0 +1,10 @@ +module( + name = "imgui", + version = "1.92.4", + bazel_compatibility = [">=7.2.1"], + compatibility_level = 0, +) + +bazel_dep(name = "platforms", version = "0.0.11") +bazel_dep(name = "rules_cc", version = "0.1.1") +bazel_dep(name = "glfw", version = "3.3.9") diff --git a/modules/imgui/1.92.4/overlay/BUILD.bazel b/modules/imgui/1.92.4/overlay/BUILD.bazel new file mode 100644 index 00000000000..ea6c5a4223a --- /dev/null +++ b/modules/imgui/1.92.4/overlay/BUILD.bazel @@ -0,0 +1,22 @@ +load("@rules_cc//cc:defs.bzl", "cc_library") + +cc_library( + name = "imgui", + srcs = [ + "imgui.cpp", + "imgui_demo.cpp", + "imgui_draw.cpp", + "imgui_tables.cpp", + "imgui_widgets.cpp", + ], + hdrs = [ + "imconfig.h", + "imgui.h", + "imgui_internal.h", + "imstb_rectpack.h", + "imstb_textedit.h", + "imstb_truetype.h", + ], + include_prefix = "imgui", + visibility = ["//visibility:public"], +) diff --git a/modules/imgui/1.92.4/overlay/MODULE.bazel b/modules/imgui/1.92.4/overlay/MODULE.bazel new file mode 120000 index 00000000000..9b599e3ad9c --- /dev/null +++ b/modules/imgui/1.92.4/overlay/MODULE.bazel @@ -0,0 +1 @@ +../MODULE.bazel \ No newline at end of file diff --git a/modules/imgui/1.92.4/overlay/backends/BUILD.bazel b/modules/imgui/1.92.4/overlay/backends/BUILD.bazel new file mode 100644 index 00000000000..803d720fcfd --- /dev/null +++ b/modules/imgui/1.92.4/overlay/backends/BUILD.bazel @@ -0,0 +1,173 @@ +load("@rules_cc//cc:defs.bzl", "cc_library") + +package(default_visibility = ["//visibility:public"]) + +cc_library( + name = "platform-glfw", + srcs = ["imgui_impl_glfw.cpp"], + hdrs = ["imgui_impl_glfw.h"], + include_prefix = "imgui", + includes = ["."], + linkopts = select({ + "@platforms//os:linux": [ + "-lpthread", + ], + "//conditions:default": [], + }), + # TODO: Remove this section after adding Windows support to @glfw: + # https://registry.bazel.build/modules/glfw + target_compatible_with = select({ + "@platforms//os:osx": [], + "@platforms//os:linux": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + deps = [ + "//:imgui", + "@glfw", + ], +) + +cc_library( + name = "platform-win32", + srcs = ["imgui_impl_win32.cpp"], + hdrs = ["imgui_impl_win32.h"], + include_prefix = "imgui", + includes = ["."], + target_compatible_with = [ + "@platforms//os:windows", + ], + deps = [ + "//:imgui", + ], +) + +cc_library( + name = "platform-sdl2", + srcs = ["imgui_impl_sdl2.cpp"], + hdrs = ["imgui_impl_sdl2.h"], + copts = ["-I/usr/include/SDL2"], + include_prefix = "imgui", + includes = ["."], + linkopts = ["-lSDL2"], + deps = ["//:imgui"], +) + +cc_library( + name = "renderer-opengl3", + srcs = ["imgui_impl_opengl3.cpp"], + hdrs = [ + "imgui_impl_opengl3.h", + "imgui_impl_opengl3_loader.h", + ], + include_prefix = "imgui", + includes = ["."], + linkopts = select({ + "@rules_cc//cc/compiler:msvc-cl": [ + "/DEFAULTLIB:opengl32", + ], + "@rules_cc//cc/compiler:clang-cl": [ + "/DEFAULTLIB:opengl32", + ], + "@bazel_tools//src/conditions:linux_x86_64": [ + "-lGL", + "-ldl", + ], + "//conditions:default": [], + }), + deps = [ + "//:imgui", + ], +) + +cc_library( + name = "renderer-dx9", + srcs = ["imgui_impl_dx9.cpp"], + hdrs = ["imgui_impl_dx9.h"], + include_prefix = "imgui", + includes = ["."], + linkopts = select({ + "@rules_cc//cc/compiler:msvc-cl": [ + "/DEFAULTLIB:D3D9", + ], + "@rules_cc//cc/compiler:clang-cl": [ + "/DEFAULTLIB:D3D9", + ], + }), + target_compatible_with = [ + "@platforms//os:windows", + ], + deps = ["//:imgui"], +) + +cc_library( + name = "renderer-dx10", + srcs = ["imgui_impl_dx10.cpp"], + hdrs = ["imgui_impl_dx10.h"], + include_prefix = "imgui", + includes = ["."], + linkopts = select({ + "@rules_cc//cc/compiler:msvc-cl": [ + "/DEFAULTLIB:D3D10", + ], + "@rules_cc//cc/compiler:clang-cl": [ + "/DEFAULTLIB:D3D10", + ], + }), + target_compatible_with = [ + "@platforms//os:windows", + ], + deps = ["//:imgui"], +) + +cc_library( + name = "renderer-dx11", + srcs = ["imgui_impl_dx11.cpp"], + hdrs = ["imgui_impl_dx11.h"], + include_prefix = "imgui", + includes = ["."], + linkopts = select({ + "@rules_cc//cc/compiler:msvc-cl": [ + "/DEFAULTLIB:D3D11", + ], + "@rules_cc//cc/compiler:clang-cl": [ + "/DEFAULTLIB:D3D11", + ], + }), + target_compatible_with = [ + "@platforms//os:windows", + ], + deps = ["//:imgui"], +) + +cc_library( + name = "renderer-dx12", + srcs = ["imgui_impl_dx12.cpp"], + hdrs = ["imgui_impl_dx12.h"], + include_prefix = "imgui", + includes = ["."], + linkopts = select({ + "@rules_cc//cc/compiler:msvc-cl": [ + "/DEFAULTLIB:D3D12", + "/DEFAULTLIB:DXGI", + ], + "@rules_cc//cc/compiler:clang-cl": [ + "/DEFAULTLIB:D3D12", + "/DEFAULTLIB:DXGI", + ], + }), + target_compatible_with = [ + "@platforms//os:windows", + ], + deps = ["//:imgui"], +) + +cc_library( + name = "renderer-sdl2", + srcs = ["imgui_impl_sdlrenderer2.cpp"], + hdrs = ["imgui_impl_sdlrenderer2.h"], + copts = ["-I/usr/include/SDL2"], + include_prefix = "imgui", + includes = ["."], + linkopts = ["-lSDL2"], + deps = ["//:imgui"], +) diff --git a/modules/imgui/1.92.4/overlay/examples/example_glfw_opengl3/BUILD.bazel b/modules/imgui/1.92.4/overlay/examples/example_glfw_opengl3/BUILD.bazel new file mode 100644 index 00000000000..5020a8eaf82 --- /dev/null +++ b/modules/imgui/1.92.4/overlay/examples/example_glfw_opengl3/BUILD.bazel @@ -0,0 +1,11 @@ +load("@rules_cc//cc:defs.bzl", "cc_binary") + +cc_binary( + name = "example_glfw_opengl3", + srcs = ["main.cpp"], + deps = [ + "//:imgui", + "//backends:platform-glfw", + "//backends:renderer-opengl3", + ], +) diff --git a/modules/imgui/1.92.4/overlay/examples/example_sdl2_sdlrenderer2/BUILD.bazel b/modules/imgui/1.92.4/overlay/examples/example_sdl2_sdlrenderer2/BUILD.bazel new file mode 100644 index 00000000000..c1eeda86e70 --- /dev/null +++ b/modules/imgui/1.92.4/overlay/examples/example_sdl2_sdlrenderer2/BUILD.bazel @@ -0,0 +1,12 @@ +load("@rules_cc//cc:defs.bzl", "cc_binary") + +cc_binary( + name = "example_sdl2_sdlrenderer2", + srcs = ["main.cpp"], + copts = ["-I/usr/include/SDL2"], + deps = [ + "//:imgui", + "//backends:platform-sdl2", + "//backends:renderer-sdl2", + ], +) diff --git a/modules/imgui/1.92.4/overlay/examples/example_win32_directx10/BUILD.bazel b/modules/imgui/1.92.4/overlay/examples/example_win32_directx10/BUILD.bazel new file mode 100644 index 00000000000..9d0ddf36509 --- /dev/null +++ b/modules/imgui/1.92.4/overlay/examples/example_win32_directx10/BUILD.bazel @@ -0,0 +1,11 @@ +load("@rules_cc//cc:defs.bzl", "cc_binary") + +cc_binary( + name = "example_win32_directx10", + srcs = ["main.cpp"], + deps = [ + "//:imgui", + "//backends:platform-win32", + "//backends:renderer-dx10", + ], +) diff --git a/modules/imgui/1.92.4/overlay/examples/example_win32_directx11/BUILD.bazel b/modules/imgui/1.92.4/overlay/examples/example_win32_directx11/BUILD.bazel new file mode 100644 index 00000000000..b80990f1a67 --- /dev/null +++ b/modules/imgui/1.92.4/overlay/examples/example_win32_directx11/BUILD.bazel @@ -0,0 +1,11 @@ +load("@rules_cc//cc:defs.bzl", "cc_binary") + +cc_binary( + name = "example_win32_directx11", + srcs = ["main.cpp"], + deps = [ + "//:imgui", + "//backends:platform-win32", + "//backends:renderer-dx11", + ], +) diff --git a/modules/imgui/1.92.4/overlay/examples/example_win32_directx12/BUILD.bazel b/modules/imgui/1.92.4/overlay/examples/example_win32_directx12/BUILD.bazel new file mode 100644 index 00000000000..beb8711d98d --- /dev/null +++ b/modules/imgui/1.92.4/overlay/examples/example_win32_directx12/BUILD.bazel @@ -0,0 +1,11 @@ +load("@rules_cc//cc:defs.bzl", "cc_binary") + +cc_binary( + name = "example_win32_directx12", + srcs = ["main.cpp"], + deps = [ + "//:imgui", + "//backends:platform-win32", + "//backends:renderer-dx12", + ], +) diff --git a/modules/imgui/1.92.4/overlay/examples/example_win32_directx9/BUILD.bazel b/modules/imgui/1.92.4/overlay/examples/example_win32_directx9/BUILD.bazel new file mode 100644 index 00000000000..16ed873377b --- /dev/null +++ b/modules/imgui/1.92.4/overlay/examples/example_win32_directx9/BUILD.bazel @@ -0,0 +1,11 @@ +load("@rules_cc//cc:defs.bzl", "cc_binary") + +cc_binary( + name = "example_win32_directx9", + srcs = ["main.cpp"], + deps = [ + "//:imgui", + "//backends:platform-win32", + "//backends:renderer-dx9", + ], +) diff --git a/modules/imgui/1.92.4/overlay/examples/example_win32_opengl3/BUILD.bazel b/modules/imgui/1.92.4/overlay/examples/example_win32_opengl3/BUILD.bazel new file mode 100644 index 00000000000..9f5a88cbdf7 --- /dev/null +++ b/modules/imgui/1.92.4/overlay/examples/example_win32_opengl3/BUILD.bazel @@ -0,0 +1,11 @@ +load("@rules_cc//cc:defs.bzl", "cc_binary") + +cc_binary( + name = "example_win32_opengl3", + srcs = ["main.cpp"], + deps = [ + "//:imgui", + "//backends:platform-win32", + "//backends:renderer-opengl3", + ], +) diff --git a/modules/imgui/1.92.4/presubmit.yml b/modules/imgui/1.92.4/presubmit.yml new file mode 100644 index 00000000000..fa8b05c8dae --- /dev/null +++ b/modules/imgui/1.92.4/presubmit.yml @@ -0,0 +1,31 @@ +matrix: + linux_platform: ["ubuntu2004"] + osx_platform: ["macos", "macos_arm64"] + bazel: [7.x, 8.x] + +tasks: + verify_windows_targets: + name: Verify windows build and test targets + platform: windows + bazel: ${{ bazel }} + build_targets: + - '@imgui//...' + verify_linux_targets: + name: Verify linux build and test targets + platform: ${{ linux_platform }} + shell_commands: + # X11 requires libx11-dev and a few other system packages, all in xorg-dev. + # See https://www.glfw.org/docs/latest/compile.html#compile_deps + - sudo apt-get update + - sudo apt-get install xorg-dev libgl1-mesa-dev -y + bazel: ${{ bazel }} + build_targets: + - '@imgui//...' + verify_osx_targets: + name: Verify osx build and test targets + platform: ${{ osx_platform }} + bazel: ${{ bazel }} + build_targets: + - '@imgui//...' + build_flags: + - "--repo_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1" diff --git a/modules/imgui/1.92.4/source.json b/modules/imgui/1.92.4/source.json new file mode 100644 index 00000000000..7c967fca535 --- /dev/null +++ b/modules/imgui/1.92.4/source.json @@ -0,0 +1,18 @@ +{ + "integrity": "sha256-DhddTZQRElMlSbQYztC9VGq+kCTsubX0MfimeiGXsLo=", + "strip_prefix": "imgui-1.92.4", + "url": "https://github.com/ocornut/imgui/archive/refs/tags/v1.92.4.tar.gz", + "patch_strip": 1, + "overlay": { + "BUILD.bazel": "sha256-gZo/FwvLbNU6xL0XX61/Wbkx2BN5j1goWLLAyye5tQc=", + "MODULE.bazel": "sha256-Mq/j8eIq2bwk/eMnt+9Y5EtG4tmChoN4jiXcSzYFNPQ=", + "backends/BUILD.bazel": "sha256-wISTqVHxwvRmxGMxsDkcX8WSIRHV4mocK2xB4BtZ1l4=", + "examples/example_glfw_opengl3/BUILD.bazel": "sha256-wTdD4nkg3rvQmg3bPjU2GJTsw5Lry9GYN/mnxMzZe8E=", + "examples/example_sdl2_sdlrenderer2/BUILD.bazel": "sha256-m0crGOr4b/QeQVlTxXbcGR2jrZvI7N2iXtIFNS0XkRA=", + "examples/example_win32_directx10/BUILD.bazel": "sha256-DaG4vRl9qrZq4U4sWEUNM1fq6Ws4Ey8uBT/EyhlWDTE=", + "examples/example_win32_directx11/BUILD.bazel": "sha256-M9ws7BtFRjWtgJR9uc+stezYOqTNUhIWUUytUiEEAJQ=", + "examples/example_win32_directx12/BUILD.bazel": "sha256-Z+2SJGxHEVE78bdTh0FCAcdzr+42/hXzHev1WoBAVcs=", + "examples/example_win32_directx9/BUILD.bazel": "sha256-LzJiJDgzJFY/ZPQraDEo5es/w+zZW2Jwm7JgKBXOg2M=", + "examples/example_win32_opengl3/BUILD.bazel": "sha256-9tzKuBS9mclm/vZiJYesPmCt14lGIihD84lJVOm2QS8=" + } +} diff --git a/modules/imgui/metadata.json b/modules/imgui/metadata.json index 207ea44690b..2bf574f6226 100644 --- a/modules/imgui/metadata.json +++ b/modules/imgui/metadata.json @@ -3,8 +3,8 @@ "maintainers": [ { "github": "phaedon", - "name": "Phaedon (F\u00e6don) Sinis", - "github_user_id": 1106027 + "github_user_id": 1106027, + "name": "Phaedon (F\u00e6don) Sinis" } ], "repository": [ @@ -12,7 +12,8 @@ ], "versions": [ "1.91.8", - "1.92.2" + "1.92.2", + "1.92.4" ], "yanked_versions": {} }