xcb: add Vulkan init to sample
This commit is contained in:
@@ -4,6 +4,14 @@ pub fn build(b: *std.Build) void {
|
||||
const target = b.standardTargetOptions(.{});
|
||||
const optimize = b.standardOptimizeOption(.{});
|
||||
|
||||
const vulkan_dep = b.dependency("vulkan_zig", .{
|
||||
.target = target,
|
||||
.optimize = optimize,
|
||||
.registry = b.path("vendor/vk.xml"),
|
||||
});
|
||||
|
||||
const vulkan_mod = vulkan_dep.module("vulkan-zig");
|
||||
|
||||
const mod = b.addModule("xcb", .{
|
||||
.root_source_file = b.path("src/root.zig"),
|
||||
.target = target,
|
||||
@@ -27,6 +35,7 @@ pub fn build(b: *std.Build) void {
|
||||
.target = target,
|
||||
.optimize = optimize,
|
||||
.imports = &.{
|
||||
.{ .name = "vulkan", .module = vulkan_mod },
|
||||
.{ .name = "xcb", .module = mod },
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user