-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.zig
37 lines (35 loc) · 994 Bytes
/
build.zig
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
const std = @import("std");
pub fn build(b: *std.Build) void {
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});
const lib = b.addStaticLibrary(.{
.name = "spirv-cross",
.target = target,
.optimize = optimize,
});
lib.linkLibC();
lib.linkLibCpp();
lib.addCSourceFiles(.{ .files = sources, .flags = &.{
"-DSPIRV_CROSS_C_API_GLSL",
"-DSPIRV_CROSS_C_API_HLSL",
"-DSPIRV_CROSS_C_API_MSL",
} });
lib.addIncludePath(b.path("."));
lib.installHeadersDirectory(b.path("."), "spirv-cross", .{
.include_extensions = &.{".h"},
});
b.installArtifact(lib);
}
const sources = &[_][]const u8{
"spirv_cpp.cpp",
"spirv_cfg.cpp",
"spirv_cross_c.cpp",
"spirv_cross.cpp",
"spirv_cross_parsed_ir.cpp",
"spirv_cross_util.cpp",
"spirv_glsl.cpp",
"spirv_hlsl.cpp",
"spirv_msl.cpp",
"spirv_parser.cpp",
"spirv_reflect.cpp",
};