WIP: Vulkan Setup
This commit is contained in:
15
build.zig
15
build.zig
@@ -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",
|
||||
|
Reference in New Issue
Block a user