build: don't build OpenGL support into imgui on iOS

This commit is contained in:
Mitchell Hashimoto
2026-02-26 10:30:12 -08:00
parent dcb7c9a4b8
commit dc514c9e11

View File

@@ -477,7 +477,9 @@ pub fn add(
.freetype = true,
.@"backend-metal" = target.result.os.tag.isDarwin(),
.@"backend-osx" = target.result.os.tag == .macos,
.@"backend-opengl3" = target.result.os.tag != .macos,
// OpenGL3 backend should only be built on non-Apple targets.
// Apple platforms use Metal (and macOS may also use the OSX backend).
.@"backend-opengl3" = !target.result.os.tag.isDarwin(),
})) |dep| {
step.root_module.addImport("dcimgui", dep.module("dcimgui"));
step.linkLibrary(dep.artifact("dcimgui"));