24 lines
651 B
Zig
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);
|
|
}
|