Archived
3
0
This repository has been archived on 2024-06-18. You can view files and clone it, but cannot push or open issues or pull requests.
libipc-old/zig-impl/build.zig

30 lines
933 B
Zig
Raw Normal View History

const std = @import("std");
2022-02-05 13:16:44 +01:00
const build_dir = "build";
pub fn build(b: *std.build.Builder) void {
// Standard release options allow the person running `zig build` to select
// between Debug, ReleaseSafe, ReleaseFast, and ReleaseSmall.
// const mode = b.standardReleaseOptions();
const mode = std.builtin.Mode.Debug;
// const mode = std.builtin.Mode.ReleaseSmall;
const lib = b.addStaticLibrary("ipc", "src/bindings.zig");
lib.setOutputDir(build_dir);
lib.linkLibC();
2022-02-05 13:16:44 +01:00
lib.setBuildMode(mode);
lib.install();
const solib = b.addSharedLibrary("ipc", "src/bindings.zig", b.version(0, 1, 0));
solib.setOutputDir(build_dir);
solib.linkLibC();
solib.setBuildMode(mode);
solib.install();
const main_tests = b.addTest("src/main.zig");
2022-02-05 13:16:44 +01:00
main_tests.setBuildMode(mode);
const test_step = b.step("test", "Run library tests");
test_step.dependOn(&main_tests.step);
}