feat: add glfw+opengl3 backend option to build.zig

This commit is contained in:
Rekai Nyangadzayi Musuka 2022-12-31 00:49:27 -06:00
parent 58596cf297
commit 02db9d1e93
1 changed files with 5 additions and 0 deletions

View File

@ -4,6 +4,7 @@ pub const Backend = enum {
no_backend,
glfw_wgpu,
win32_dx12,
glfw_opengl3,
};
pub const Options = struct {
@ -69,6 +70,10 @@ pub fn link(exe: *std.Build.CompileStep, options: Options) void {
exe.addCSourceFile(thisDir() ++ "/libs/imgui/backends/imgui_impl_glfw.cpp", cflags);
exe.addCSourceFile(thisDir() ++ "/libs/imgui/backends/imgui_impl_wgpu.cpp", cflags);
},
.glfw_opengl3 => {
exe.addCSourceFile(thisDir() ++ "/libs/imgui/backends/imgui_impl_glfw.cpp", cflags);
exe.addCSourceFile(thisDir() ++ "/libs/imgui/backends/imgui_impl_opengl3.cpp", cflags);
},
.win32_dx12 => {
exe.addCSourceFile(thisDir() ++ "/libs/imgui/backends/imgui_impl_win32.cpp", cflags);
exe.addCSourceFile(thisDir() ++ "/libs/imgui/backends/imgui_impl_dx12.cpp", cflags);