spdlog/build.zig
Aleksandr Lebedev e7c211fc64
Some checks failed
Continuous Integration / build (push) Has been cancelled
Update to 1.16.0 and Zig v0.15
2025-11-19 15:39:00 +01:00

33 lines
971 B
Zig

const std = @import("std");
pub fn build(b: *std.Build) void {
const upstream = b.dependency("spdlog", .{});
const lib = b.addLibrary(.{
.name = "spdlog",
.linkage = .static,
.root_module = b.addModule("spdlog", .{
.target = b.standardTargetOptions(.{}),
.optimize = b.standardOptimizeOption(.{}),
.link_libc = true,
}),
});
lib.linkLibCpp();
lib.addIncludePath(upstream.path("include"));
lib.addCSourceFiles(.{
.root = upstream.path("src"),
.files = &.{
"async.cpp",
"bundled_fmtlib_format.cpp",
"cfg.cpp",
"color_sinks.cpp",
"file_sinks.cpp",
"spdlog.cpp",
"stdout_sinks.cpp",
},
.flags = &.{
"-DSPDLOG_COMPILED_LIB",
},
});
lib.installHeadersDirectory(upstream.path("include/spdlog"), "spdlog", .{});
b.installArtifact(lib);
}