First version, lets go
This commit is contained in:
parent
ba4c0f8678
commit
1a463c6e46
3 changed files with 50 additions and 1 deletions
29
build.zig
Normal file
29
build.zig
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
const std = @import("std");
|
||||
|
||||
pub fn build(b: *std.Build) void {
|
||||
const upstream = b.dependency("spdlog", .{});
|
||||
const lib = b.addStaticLibrary(.{
|
||||
.name = "spdlog",
|
||||
.target = b.standardTargetOptions(.{}),
|
||||
.optimize = b.standardOptimizeOption(.{}),
|
||||
});
|
||||
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);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue