Update to zig v0.15
- Added manifest.scm
This commit is contained in:
parent
c111905f8e
commit
484dfb71bc
11 changed files with 25 additions and 633 deletions
33
build.zig
33
build.zig
|
|
@ -24,12 +24,17 @@ pub fn build(b: *std.Build) !void {
|
|||
const simdjson_evex512: ?*std.Build.Step.WriteFile = if (target.result.cpu.arch == .x86_64) try fix_evex512_simdjson(b, simdjson_dep) else null;
|
||||
const simdjson_source_file_root = if (simdjson_evex512) |evex512| evex512.getDirectory() else simdjson_dep.path("singleheader");
|
||||
|
||||
const simdjson_lib = b.addStaticLibrary(.{
|
||||
.name = "simdjson",
|
||||
const simdjson_mod = b.addModule("simdjson", .{
|
||||
.target = target,
|
||||
.optimize = optimize,
|
||||
.link_libc = true,
|
||||
});
|
||||
|
||||
const simdjson_lib = b.addLibrary(.{
|
||||
.name = "simdjson",
|
||||
.root_module = simdjson_mod,
|
||||
.linkage = .static,
|
||||
});
|
||||
simdjson_lib.linkLibCpp();
|
||||
simdjson_lib.addCSourceFiles(.{
|
||||
.root = simdjson_source_file_root,
|
||||
|
|
@ -43,18 +48,13 @@ pub fn build(b: *std.Build) !void {
|
|||
if (simdjson_evex512) |evex512| simdjson_lib.step.dependOn(&evex512.step);
|
||||
b.installArtifact(simdjson_lib);
|
||||
|
||||
const fastgltf_lib: *std.Build.Step.Compile = switch (preferred_link_mode) {
|
||||
inline else => |x| switch (x) {
|
||||
.static => std.Build.addStaticLibrary,
|
||||
.dynamic => std.Build.addSharedLibrary,
|
||||
}(b, .{
|
||||
.name = "fastgltf",
|
||||
// .version = version,
|
||||
.target = target,
|
||||
.optimize = optimize,
|
||||
.link_libc = true,
|
||||
}),
|
||||
};
|
||||
const fastgltf_mod = b.addModule("fastgltf", .{
|
||||
.target = target,
|
||||
.optimize = optimize,
|
||||
.link_libc = true,
|
||||
});
|
||||
|
||||
const fastgltf_lib = b.addLibrary(.{ .name = "fastgltf", .linkage = preferred_link_mode, .root_module = fastgltf_mod });
|
||||
fastgltf_lib.linkLibCpp();
|
||||
fastgltf_lib.linkLibrary(simdjson_lib);
|
||||
fastgltf_lib.addIncludePath(fastgltf_dep.path(b.pathJoin(&.{"include"})));
|
||||
|
|
@ -77,11 +77,12 @@ pub fn build(b: *std.Build) !void {
|
|||
});
|
||||
b.installArtifact(fastgltf_lib);
|
||||
|
||||
const example = b.addExecutable(.{
|
||||
.name = "fastgltf-example",
|
||||
const example_mod = b.addModule("fastgltf-example", .{
|
||||
.target = target,
|
||||
.optimize = optimize,
|
||||
});
|
||||
|
||||
const example = b.addExecutable(.{ .name = "fastgltf-example", .root_module = example_mod });
|
||||
example.linkLibCpp();
|
||||
example.addIncludePath(.{ .cwd_relative = b.pathJoin(&.{ b.install_path, "include" }) });
|
||||
example.linkLibrary(fastgltf_lib);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue