summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLorenzo Torres <torres@sideros.org>2025-03-16 17:43:13 +0100
committerLorenzo Torres <torres@sideros.org>2025-03-16 17:43:13 +0100
commit5dbfcdb5bf49dc5eebf27fa1b1c9a48568be01e1 (patch)
tree5ad9206deed16abff83382d42d5596cc1d5abd84
parent0e08e5a05572e757dbb2037597dffe0238cb98ca (diff)
removed opengl from build.zig
-rw-r--r--build.zig19
1 files changed, 2 insertions, 17 deletions
diff --git a/build.zig b/build.zig
index b4bb066..6e17bb6 100644
--- a/build.zig
+++ b/build.zig
@@ -63,23 +63,8 @@ pub fn build(b: *std.Build) void {
});
exe.addIncludePath(b.path("ext/glfw/include"));
- // If "opengl" was passed as an option, this statement will define USE_OPENGL,
- // which will be checked inside renderer.zig, it will use the opengl backend if that was defined,
- // else it won't thus the backend will be vulkan
- const opengl = b.option(bool, "opengl", "Use OpenGL instead of Vulkan.") orelse false;
- const options = b.addOptions();
- options.addOption(bool, "opengl", opengl);
- exe.root_module.addOptions("config", options);
- if (opengl) {
- exe.addIncludePath(b.path("ext/gl/include"));
- exe.addCSourceFile(.{
- .file = b.path("ext/gl/src/glad.c"),
- .flags = &[_][]const u8{"-Iinclude"},
- });
- } else {
- exe.linkSystemLibrary("vulkan");
- compileAllShaders(b, exe);
- }
+ exe.linkSystemLibrary("vulkan");
+ compileAllShaders(b, exe);
exe.linkLibrary(glfw);
exe.linkLibC();