[package]
name = "dear-imgui-sdl3"
version = "0.10.3"
edition.workspace = true
description = "SDL3 platform backend with optional OpenGL3 renderer for dear-imgui-rs"
license.workspace = true
repository.workspace = true
homepage.workspace = true
documentation = "https://docs.rs/dear-imgui-sdl3"
categories.workspace = true
keywords.workspace = true
build = "build.rs"
links = "dear-imgui-sdl3-backend"

[dependencies]
dear-imgui-rs = { path = "../../dear-imgui", version = "0.10" }
dear-imgui-sys = { path = "../../dear-imgui-sys", version = "0.10" }
sdl3-sys = "0.6"
thiserror.workspace = true

[target.'cfg(any(target_os = "linux", target_os = "windows"))'.dependencies]
# On Linux/Windows, prefer building SDL3 from source so CI and users don't need
# a pre-installed system SDL3. sdl3-sys will download and build SDL3 via CMake.
sdl3 = { version = "0.17", features = ["build-from-source"] }

[target.'cfg(target_os = "macos")'.dependencies]
# On macOS, rely on a system SDL3 install (e.g. `brew install sdl3`) instead of
# building from source to avoid CMake permission/toolchain issues.
sdl3 = { version = "0.17" }

[build-dependencies]
cc.workspace = true
pkg-config.workspace = true

[features]
default = []
# Enable the official C++ OpenGL3 renderer backend (imgui_impl_opengl3).
# Off by default to keep SDL3 platform-only mode lightweight.
opengl3-renderer = []
# Enable multi-viewport helpers (requires multi-viewport support in dear-imgui-rs).
multi-viewport = ["dear-imgui-rs/multi-viewport"]
