Compare commits
1 commit
911d13fc1c
...
e0657afa53
Author | SHA1 | Date | |
---|---|---|---|
|
e0657afa53 |
|
@ -15,6 +15,12 @@ pub fn build(b: *std.Build) void {
|
||||||
// set a preferred release mode, allowing the user to decide how to optimize.
|
// set a preferred release mode, allowing the user to decide how to optimize.
|
||||||
const optimize = b.standardOptimizeOption(.{});
|
const optimize = b.standardOptimizeOption(.{});
|
||||||
|
|
||||||
|
const raylib_dep = b.dependency("raylib", .{
|
||||||
|
// These are the arguments to the dependency. It expects a target and optimization level.
|
||||||
|
.target = target,
|
||||||
|
.optimize = optimize,
|
||||||
|
});
|
||||||
|
|
||||||
const exe = b.addExecutable(.{
|
const exe = b.addExecutable(.{
|
||||||
.name = "zig",
|
.name = "zig",
|
||||||
// In this case the main source file is merely a path, however, in more
|
// In this case the main source file is merely a path, however, in more
|
||||||
|
@ -24,6 +30,8 @@ pub fn build(b: *std.Build) void {
|
||||||
.optimize = optimize,
|
.optimize = optimize,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
exe.addModule(raylib_dep.module("some_mod"));
|
||||||
|
|
||||||
// This declares intent for the executable to be installed into the
|
// This declares intent for the executable to be installed into the
|
||||||
// standard location when the user invokes the "install" step (the default
|
// standard location when the user invokes the "install" step (the default
|
||||||
// step when running `zig build`).
|
// step when running `zig build`).
|
||||||
|
|
10
zig/build.zig.zon
Normal file
10
zig/build.zig.zon
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
.{
|
||||||
|
.name = "fabapp",
|
||||||
|
.version = "0.1.0",
|
||||||
|
.dependencies = .{
|
||||||
|
.raylib = .{
|
||||||
|
.url = "https://github.com/raysan5/raylib/archive/refs/tags/4.5.0.tar.gz",
|
||||||
|
.hash = "1220ff8eeb8c51ed28ef7d1224ba2968e00e689774dd6316cb25347a44844dbf210f",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
Loading…
Reference in a new issue