mirror of
https://github.com/NeoFlock/neonucleus.git
synced 2025-09-24 17:13:31 +02:00
Merge pull request #18 from speedy-lex/raylib-zig-dep
raylib submodule -> zig dependency
This commit is contained in:
commit
20d7ebf7f7
3
.gitmodules
vendored
3
.gitmodules
vendored
@ -10,6 +10,3 @@
|
|||||||
path = foreign/lua54
|
path = foreign/lua54
|
||||||
url = https://github.com/lua/lua
|
url = https://github.com/lua/lua
|
||||||
branch = v5.4
|
branch = v5.4
|
||||||
[submodule "foreign/raylib"]
|
|
||||||
path = foreign/raylib
|
|
||||||
url = https://github.com/raysan5/raylib
|
|
||||||
|
12
build.zig
12
build.zig
@ -32,15 +32,9 @@ const LuaVersion = enum {
|
|||||||
};
|
};
|
||||||
|
|
||||||
fn compileRaylib(b: *std.Build, os: std.Target.Os.Tag, c: *std.Build.Step.Compile) void {
|
fn compileRaylib(b: *std.Build, os: std.Target.Os.Tag, c: *std.Build.Step.Compile) void {
|
||||||
// TODO: find out how to send our target to this build cmd
|
const raylib = b.dependency("raylib", .{});
|
||||||
const raylib = b.addSystemCommand(&.{ "zig", "build" });
|
c.addIncludePath(raylib.path(raylib.builder.h_dir));
|
||||||
raylib.setCwd(b.path("foreign/raylib/"));
|
c.linkLibrary(raylib.artifact("raylib"));
|
||||||
raylib.stdio = .inherit;
|
|
||||||
|
|
||||||
c.step.dependOn(&raylib.step);
|
|
||||||
c.addIncludePath(b.path("foreign/raylib/zig-out/include/"));
|
|
||||||
c.addLibraryPath(b.path("foreign/raylib/zig-out/lib/"));
|
|
||||||
c.linkSystemLibrary("raylib");
|
|
||||||
if (os == .windows) {
|
if (os == .windows) {
|
||||||
c.linkSystemLibrary("WinMM");
|
c.linkSystemLibrary("WinMM");
|
||||||
c.linkSystemLibrary("GDI32");
|
c.linkSystemLibrary("GDI32");
|
||||||
|
13
build.zig.zon
Normal file
13
build.zig.zon
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
.{
|
||||||
|
.name = .neonucleus,
|
||||||
|
.fingerprint = 0xc9c7605b6b82f1a7,
|
||||||
|
.version = "0.0.1",
|
||||||
|
.paths = .{ "data", "build.zig", "build.zig.zon", "src" },
|
||||||
|
|
||||||
|
.dependencies = .{
|
||||||
|
.raylib = .{
|
||||||
|
.url = "https://github.com/raysan5/raylib/archive/46f01e315d07d0b1fedd1a3c388d1acaa9f6ccd6.tar.gz",
|
||||||
|
.hash = "raylib-5.5.0-whq8uO5uNgRDK_yuN0AGftGhWSVyctgPQNALENrZHt3k",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
@ -1 +0,0 @@
|
|||||||
Subproject commit 46f01e315d07d0b1fedd1a3c388d1acaa9f6ccd6
|
|
Loading…
x
Reference in New Issue
Block a user