hypatia/build.zig

38 lines
1.1 KiB
Zig
Raw Permalink Normal View History

2024-05-13 15:48:50 +00:00
const std = @import("std");
pub fn build(b: *std.Build) void {
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});
const hypatia = b.addExecutable(.{
.name = "hypatia",
.root_source_file = .{
.path = "main.zig",
},
.target = target,
.optimize = optimize,
});
const zglfw = b.dependency("zglfw", .{});
hypatia.root_module.addImport("zglfw", zglfw.module("root"));
hypatia.linkLibrary(zglfw.artifact("glfw"));
const zgpu = b.dependency("zgpu", .{});
hypatia.root_module.addImport("zgpu", zgpu.module("root"));
hypatia.linkLibrary(zgpu.artifact("zdawn"));
const zgui = b.dependency("zgui", .{
.shared = false,
.with_implot = false,
.backend = .glfw_wgpu,
});
hypatia.root_module.addImport("zgui", zgui.module("root"));
hypatia.linkLibrary(zgui.artifact("imgui"));
@import("system_sdk").addLibraryPathsTo(hypatia);
@import("zgpu").addLibraryPathsTo(hypatia);
b.installArtifact(hypatia);
}