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 f3ced56ce3
commit 74f997d8a0
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 BuildOptions = struct {
@ -68,6 +69,10 @@ pub fn link(exe: *std.build.LibExeObjStep, bos: BuildOptionsStep) 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);