vcpkg icon indicating copy to clipboard operation
vcpkg copied to clipboard

[imgui] Add SDL2 binding support with default-features disabled

Open Copilot opened this issue 8 months ago • 1 comments

This PR adds SDL2 binding support to the imgui port as requested in the issue. The implementation allows users to use imgui with SDL2 without being forced to include SDL2's default features like dbus.

Changes Made

Added Features

  • sdl2-binding: Makes available SDL2 platform backend with "default-features": false
  • sdl2-renderer-binding: Makes available SDL2 renderer backend with "default-features": false

Implementation Details

  • vcpkg.json: Added both SDL2 binding features with "default-features": false for SDL2 dependency
  • CMakeLists.txt: Added build support for IMGUI_BUILD_SDL2_BINDING and IMGUI_BUILD_SDL2_RENDERER_BINDING options
  • imgui-config.cmake.in: Added SDL2 dependency detection for packages using these features
  • portfile.cmake: Added feature option mappings for the new SDL2 bindings

Usage

Users can now install imgui with SDL2 support without default features:

vcpkg install imgui[sdl2-binding]
vcpkg install imgui[sdl2-renderer-binding]

This allows projects to opt out of SDL2's default features (dbus, ibus, wayland, x11 on Linux) while still getting SDL2 functionality.

Verification

  • Features are visible in vcpkg search imgui
  • vcpkg.json passes format validation
  • Dependency resolution works correctly with explicit SDL2 configuration

Fixes #45944.

[!WARNING]

Firewall rules blocked me from connecting to one or more addresses

I tried to connect to the following addresses, but was blocked by firewall rules:

  • api.github.com
    • Triggering command: curl -s REDACTED (dns block)
  • ftp.gnu.org
    • Triggering command: curl --fail --retry 3 -L REDACTED --create-dirs --output automake-1.17.tar.gz.5718.part -H User-Agent: vcpkg/2025-06-02-145689e84b7637525510e2c9b4ee603fda046b56 (curl) (dns block)
  • www.mirrorservice.org
    • Triggering command: curl --fail --retry 3 -L REDACTED --create-dirs --output automake-1.17.tar.gz.5718.part -H User-Agent: vcpkg/2025-06-02-145689e84b7637525510e2c9b4ee603fda046b56 (curl) (dns block)

If you need me to access, download, or install something from one of these locations, you can either:


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Copilot avatar Jun 11 '25 20:06 Copilot

Invalid.

dg0yt avatar Jun 12 '25 01:06 dg0yt