mirror of
https://github.com/zoriya/realm.git
synced 2025-12-06 06:46:11 +00:00
30 lines
983 B
Zig
30 lines
983 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 = "relm",
|
|
.root_source_file = b.path("src/main.zig"),
|
|
.link_libc = true,
|
|
.target = target,
|
|
.optimize = optimize,
|
|
});
|
|
b.installArtifact(exe);
|
|
|
|
const registry = b.dependency("vulkan_headers", .{}).path("registry/vk.xml");
|
|
const vk_gen = b.dependency("vulkan_zig", .{}).artifact("vulkan-zig-generator");
|
|
const vk_generate_cmd = b.addRunArtifact(vk_gen);
|
|
vk_generate_cmd.addFileArg(registry);
|
|
exe.root_module.addAnonymousImport("vulkan", .{
|
|
.root_source_file = vk_generate_cmd.addOutputFileArg("vk.zig"),
|
|
});
|
|
|
|
const glfw_dep = b.dependency("mach-glfw", .{
|
|
.target = target,
|
|
.optimize = optimize,
|
|
});
|
|
exe.root_module.addImport("mach-glfw", glfw_dep.module("mach-glfw"));
|
|
}
|