28 lines
753 B
Zig
28 lines
753 B
Zig
const std = @import("std");
|
|
|
|
pub fn build(b: *std.Build) void {
|
|
const target = b.standardTargetOptions(.{});
|
|
const optimize = b.standardOptimizeOption(.{});
|
|
|
|
const exe = b.addExecutable(.{
|
|
.name = "OpenGLレンダー",
|
|
.root_module = b.createModule(.{
|
|
.root_source_file = b.path("src/main.zig"),
|
|
.target = target,
|
|
.optimize = optimize,
|
|
}),
|
|
});
|
|
|
|
const zglfw = b.dependency("zglfw", .{
|
|
.target = target,
|
|
.optimize = optimize,
|
|
});
|
|
exe.root_module.addImport("zglfw", zglfw.module("root"));
|
|
exe.root_module.linkLibrary(zglfw.artifact("glfw"));
|
|
exe.root_module.addIncludePath(b.path("./include"));
|
|
exe.root_module.addCSourceFile(.{
|
|
.file = b.path("src/glad.c" ),
|
|
});
|
|
|
|
b.installArtifact(exe);
|
|
} |