vcpkg
vcpkg copied to clipboard
[imgui] Add SDL2 binding support with default-features disabled
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": falsefor SDL2 dependency -
CMakeLists.txt: Added build support for
IMGUI_BUILD_SDL2_BINDINGandIMGUI_BUILD_SDL2_RENDERER_BINDINGoptions - 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:
- Configure Actions setup steps to set up my environment, which run before the firewall is enabled
- Add the appropriate URLs or hosts to my firewall allow list
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.
Invalid.