init
This commit is contained in:
parent
796eb066bb
commit
66674cf5db
6 changed files with 50 additions and 47 deletions
|
@ -26,8 +26,13 @@ pub fn build(b: *std.Build) void {
|
|||
.root_source_file = b.path("src/root.zig"),
|
||||
.target = target,
|
||||
.optimize = optimize,
|
||||
.link_libc = true,
|
||||
});
|
||||
|
||||
lib_mod.addIncludePath(b.path("src/"));
|
||||
lib_mod.addLibraryPath(b.path("imports/"));
|
||||
lib_mod.linkSystemLibrary("uwurandom_c", .{ .needed = true });
|
||||
|
||||
// We will also create a module for our other entry point, 'main.zig'.
|
||||
const exe_mod = b.createModule(.{
|
||||
// `root_source_file` is the Zig "entry point" of the module. If a module
|
||||
|
@ -49,7 +54,7 @@ pub fn build(b: *std.Build) void {
|
|||
// for actually invoking the compiler.
|
||||
const lib = b.addLibrary(.{
|
||||
.linkage = .static,
|
||||
.name = "zig_binding",
|
||||
.name = "uwurandom-rs-zig-binding",
|
||||
.root_module = lib_mod,
|
||||
});
|
||||
|
||||
|
@ -61,7 +66,7 @@ pub fn build(b: *std.Build) void {
|
|||
// This creates another `std.Build.Step.Compile`, but this one builds an executable
|
||||
// rather than a static library.
|
||||
const exe = b.addExecutable(.{
|
||||
.name = "zig_binding",
|
||||
.name = "zig-uwurandom-example",
|
||||
.root_module = exe_mod,
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue