mirror of
https://github.com/Not-Nik/raylib-zig.git
synced 2025-09-09 03:57:29 +00:00
Fix file exists in multiple modules error when including raymath
This commit is contained in:
parent
0ee5495059
commit
0d4cc3ac8c
@ -2,6 +2,7 @@
|
||||
|
||||
const std = @import("std");
|
||||
const Builder = std.build.Builder;
|
||||
const rl = @This();
|
||||
|
||||
const Program = struct {
|
||||
name: []const u8,
|
||||
@ -65,12 +66,16 @@ pub fn getArtifact(b: *std.Build, target: std.zig.CrossTarget, optimize: std.bui
|
||||
}
|
||||
|
||||
pub fn getModule(b: *std.Build) *std.Build.Module {
|
||||
if (b.modules.contains("raylib")) {
|
||||
return b.modules.get("raylib").?;
|
||||
}
|
||||
return b.addModule("raylib", .{ .source_file = .{ .path = "lib/raylib-zig.zig" } });
|
||||
}
|
||||
|
||||
pub const math = struct {
|
||||
pub fn getModule(b: *std.Build) *std.Build.Module {
|
||||
return b.addModule("raylib-math", .{ .source_file = .{ .path = "lib/raylib-zig-math.zig" } });
|
||||
var raylib = rl.getModule(b);
|
||||
return b.addModule("raylib-math", .{ .source_file = .{ .path = "lib/raylib-zig-math.zig" }, .dependencies = &.{.{ .name = "raylib-zig", .module = raylib }} });
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -3,8 +3,8 @@
|
||||
.version = "0.1.0",
|
||||
.dependencies = .{
|
||||
.raylib = .{
|
||||
.url = "https://github.com/raysan5/raylib/archive/ad2338b994785c887528c91a843d6720cac2c2b0.tar.gz",
|
||||
.hash = "122003990d16146cfb85e04e0557f41b54e81bae635fa4379f3a597ed5fb7716ee53",
|
||||
.url = "https://github.com/raysan5/raylib/archive/6094869e3e845e90e1e8ae41b98e889fb3e13e78.tar.gz",
|
||||
.hash = "12203b7a16bcf8d7fe4c9990a46d92b6f2e35531a4b82eb3bdf8ba4a0dbcc5f21415",
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
// raylib-zig (c) Nikolas Wipper 2023
|
||||
|
||||
const rl = @import("raylib-zig.zig");
|
||||
const rl = @import("raylib-zig");
|
||||
const rlm = @import("raylib-zig-math.zig");
|
||||
|
@ -1,6 +1,6 @@
|
||||
// raylib-zig (c) Nikolas Wipper 2023
|
||||
|
||||
const rl = @import("raylib-zig.zig");
|
||||
const rl = @import("raylib-zig");
|
||||
const cdef = @import("raylib-zig-math-ext.zig");
|
||||
const std = @import("std");
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
// raylib-zig (c) Nikolas Wipper 2023
|
||||
|
||||
const rl = @import("raylib-zig.zig");
|
||||
const rl = @import("raylib-zig");
|
||||
const rlm = @import("raylib-zig-math.zig");
|
||||
|
||||
pub extern "c" fn Clamp(value: f32, min: f32, max: f32) f32;
|
||||
|
@ -1,6 +1,6 @@
|
||||
// raylib-zig (c) Nikolas Wipper 2023
|
||||
|
||||
const rl = @import("raylib-zig.zig");
|
||||
const rl = @import("raylib-zig");
|
||||
const cdef = @import("raylib-zig-math-ext.zig");
|
||||
const std = @import("std");
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user