opengl-c-example/build.zig
2024-01-14 12:11:49 +02:00

24 lines
651 B
Zig

const std = @import("std");
pub fn build(b: *std.build.Builder) void {
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});
const exe = b.addExecutable(.{
.name = "opengl-example",
.root_source_file = .{ .path = "main.c" },
.optimize = optimize,
.target = target
});
exe.linkLibC();
exe.linkSystemLibrary("GL");
exe.linkSystemLibrary("glfw");
exe.linkSystemLibrary("GLEW");
const run_cmd = b.addRunArtifact(exe);
const run_step = b.step("run", "Run simple program");
run_step.dependOn(&run_cmd.step);
b.installArtifact(exe);
}