tringle
This commit is contained in:
20
build.zig
20
build.zig
@@ -1,8 +1,9 @@
|
||||
const std = @import("std");
|
||||
|
||||
const cimgui = @import("cimgui");
|
||||
const sokol = @import("sokol");
|
||||
|
||||
pub fn build(b: *std.Build) void {
|
||||
pub fn build(b: *std.Build) !void {
|
||||
const target = b.standardTargetOptions(.{});
|
||||
const optimize = b.standardOptimizeOption(.{});
|
||||
|
||||
@@ -26,8 +27,23 @@ pub fn build(b: *std.Build) void {
|
||||
});
|
||||
sokol_dep.artifact("sokol_clib").addIncludePath(cimgui_dep.path(cimgui_conf.include_dir));
|
||||
|
||||
const sokol_mod = sokol_dep.module("sokol");
|
||||
const shdc_dep = sokol_dep.builder.dependency("shdc", .{});
|
||||
|
||||
const shader_mod = try sokol.shdc.createModule(b, "shader", sokol_mod, .{
|
||||
.shdc_dep = shdc_dep,
|
||||
.input = "src/shader.glsl",
|
||||
.output = "shader.zig",
|
||||
.slang = .{
|
||||
.glsl430 = true,
|
||||
.hlsl5 = true,
|
||||
.metal_macos = true,
|
||||
},
|
||||
});
|
||||
|
||||
exe_mod.addImport("cimgui", cimgui_dep.module(cimgui_conf.module_name));
|
||||
exe_mod.addImport("sokol", sokol_dep.module("sokol"));
|
||||
exe_mod.addImport("shader", shader_mod);
|
||||
exe_mod.addImport("sokol", sokol_mod);
|
||||
|
||||
const exe = b.addExecutable(.{
|
||||
.name = "voxel-game",
|
||||
|
||||
Reference in New Issue
Block a user