WIP: Vulkan Setup

This commit is contained in:
2025-02-15 12:31:04 -05:00
parent 2b3734a087
commit f325f65f4f
5 changed files with 380 additions and 14 deletions

View File

@@ -4,19 +4,32 @@ pub fn build(b: *std.Build) void {
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});
const vulkan = b.dependency("vulkan_zig", .{
.registry = b.dependency("vulkan_headers", .{}).path("registry/vk.xml"),
.target = target,
.optimize = optimize,
}).module("vulkan-zig");
const glfw = b.dependency("glfw", .{
.target = target,
.optimize = optimize,
}).artifact("glfw");
const lib_mod = b.createModule(.{
.root_source_file = b.path("src/root.zig"),
.target = target,
.optimize = optimize,
});
lib_mod.addImport("vk", vulkan);
const exe_mod = b.createModule(.{
.root_source_file = b.path("src/main.zig"),
.target = target,
.optimize = optimize,
});
exe_mod.addImport("vk", vulkan);
exe_mod.addImport("zig-shape-lib", lib_mod);
exe_mod.linkLibrary(glfw);
const lib = b.addStaticLibrary(.{
.name = "zig-shape",