build with Zig package manager
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
5698fc666b
commit
e4a2e007fc
7 changed files with 27 additions and 11 deletions
12
.gitmodules
vendored
12
.gitmodules
vendored
|
|
@ -24,3 +24,15 @@
|
||||||
[submodule "libs/gpu/libs/mach-gpu-dawn"]
|
[submodule "libs/gpu/libs/mach-gpu-dawn"]
|
||||||
path = libs/gpu/libs/mach-gpu-dawn
|
path = libs/gpu/libs/mach-gpu-dawn
|
||||||
url = https://github.com/hexops/mach-gpu-dawn
|
url = https://github.com/hexops/mach-gpu-dawn
|
||||||
|
[submodule "libs/mach-gpu"]
|
||||||
|
path = libs/mach-gpu
|
||||||
|
url = https://github.com/hexops/mach-gpu
|
||||||
|
[submodule "libs/mach-gpu-dawn"]
|
||||||
|
path = libs/mach-gpu-dawn
|
||||||
|
url = https://github.com/hexops/mach-gpu-dawn
|
||||||
|
[submodule "libs/mach-freetype"]
|
||||||
|
path = libs/mach-freetype
|
||||||
|
url = https://github.com/hexops/mach-freetype
|
||||||
|
[submodule "libs/mach-core"]
|
||||||
|
path = libs/mach-core
|
||||||
|
url = https://github.com/hexops/mach-core
|
||||||
|
|
|
||||||
10
build.zig
10
build.zig
|
|
@ -1,13 +1,13 @@
|
||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
const builtin = @import("builtin");
|
const builtin = @import("builtin");
|
||||||
const freetype = @import("libs/freetype/build.zig");
|
const freetype = @import("libs/mach-freetype/build.zig");
|
||||||
const glfw = @import("mach_glfw");
|
const glfw = @import("mach_glfw");
|
||||||
const sysaudio = @import("mach_sysaudio");
|
const sysaudio = @import("mach_sysaudio");
|
||||||
pub const gpu_dawn = @import("libs/gpu-dawn/build.zig"); // TODO(build-system): make this private
|
pub const gpu_dawn = @import("libs/mach-gpu-dawn/build.zig"); // TODO(build-system): make this private
|
||||||
const gpu = @import("libs/gpu/build.zig").Sdk(.{
|
const gpu = @import("libs/mach-gpu/build.zig").Sdk(.{
|
||||||
.gpu_dawn = gpu_dawn,
|
.gpu_dawn = gpu_dawn,
|
||||||
});
|
});
|
||||||
const core = @import("libs/core/build.zig").Sdk(.{
|
const core = @import("libs/mach-core/build.zig").Sdk(.{
|
||||||
.gpu = gpu,
|
.gpu = gpu,
|
||||||
.gpu_dawn = gpu_dawn,
|
.gpu_dawn = gpu_dawn,
|
||||||
.glfw = glfw,
|
.glfw = glfw,
|
||||||
|
|
@ -34,7 +34,7 @@ pub fn module(b: *std.Build, optimize: std.builtin.OptimizeMode, target: std.zig
|
||||||
_module = b.createModule(.{
|
_module = b.createModule(.{
|
||||||
.source_file = .{ .path = sdkPath("/src/main.zig") },
|
.source_file = .{ .path = sdkPath("/src/main.zig") },
|
||||||
.dependencies = &.{
|
.dependencies = &.{
|
||||||
.{ .name = "core", .module = core.module(b) },
|
.{ .name = "core", .module = core.module(b, optimize, target) },
|
||||||
.{ .name = "ecs", .module = mach_ecs.module("mach-ecs") },
|
.{ .name = "ecs", .module = mach_ecs.module("mach-ecs") },
|
||||||
.{ .name = "earcut", .module = mach_earcut.module("mach-earcut") },
|
.{ .name = "earcut", .module = mach_earcut.module("mach-earcut") },
|
||||||
.{ .name = "sysaudio", .module = sysaudio.module(b, optimize, target) },
|
.{ .name = "sysaudio", .module = sysaudio.module(b, optimize, target) },
|
||||||
|
|
|
||||||
|
|
@ -27,16 +27,16 @@
|
||||||
.hash = "1220ead8a15f606d6f0f853fe401460dfe18811e3d5d1aa7e808be825e44f17f0dc3",
|
.hash = "1220ead8a15f606d6f0f853fe401460dfe18811e3d5d1aa7e808be825e44f17f0dc3",
|
||||||
},
|
},
|
||||||
.mach_sysaudio = .{
|
.mach_sysaudio = .{
|
||||||
.url = "https://github.com/hexops/mach-sysaudio/archive/b5bf8a612b5b538b81c17a632ef0dc7d6d9b32ca.tar.gz",
|
.url = "https://github.com/hexops/mach-sysaudio/archive/583d017ed01540c421ff5004825036b7c982eb7c.tar.gz",
|
||||||
.hash = "1220b52bfeee934e5b4863123fc702cdce84b6c5bec7a00ac1b4ccd91504f006b7f6",
|
.hash = "12200bef31118c7269e565c7a9fbd6719257182bbe8dd85d18b5b70b007d8e6c7ed3",
|
||||||
},
|
},
|
||||||
.mach_glfw = .{
|
.mach_glfw = .{
|
||||||
.url = "https://github.com/hexops/mach-glfw/archive/b119c63dd77764eeafe758d54accd0329821a729.tar.gz",
|
.url = "https://github.com/hexops/mach-glfw/archive/8e78e0175951117213ea65fec32fd61f2e39f4ea.tar.gz",
|
||||||
.hash = "1220fb0fb65621a4fc7406e4f74a87a0c60208f8a257cd7ca4e20da0925f875e70d0",
|
.hash = "12202c9e56ab6822cf9a16f1b5c15ff17ba17c67c1ec12aa77bc2313dfe9d3c235ec",
|
||||||
},
|
},
|
||||||
.glfw = .{
|
.glfw = .{
|
||||||
.url = "https://github.com/hexops/glfw/archive/49c21c3d2fcaf9799b593f5320ce8e598a692c74.tar.gz",
|
.url = "https://github.com/hexops/glfw/archive/0e4cdba4216c6def0423462a2f21fef80683d56d.tar.gz",
|
||||||
.hash = "12200a907165afc4c099d4d19e2f7ce9923a72116006d8f5f5af3a9a071fa66171d2",
|
.hash = "1220a0b036095c2c54af347c86514ed9dab431299f0140b0e434ed119f85a976c32b",
|
||||||
},
|
},
|
||||||
.direct3d_headers = .{
|
.direct3d_headers = .{
|
||||||
.url = "https://github.com/hexops/direct3d-headers/archive/773dce3f079eecdccc7c71d1318a0741649d568b.tar.gz",
|
.url = "https://github.com/hexops/direct3d-headers/archive/773dce3f079eecdccc7c71d1318a0741649d568b.tar.gz",
|
||||||
|
|
|
||||||
1
libs/mach-core
Submodule
1
libs/mach-core
Submodule
|
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit ed911a7f83605adb8c31cf1a02a18a7879a260bc
|
||||||
1
libs/mach-freetype
Submodule
1
libs/mach-freetype
Submodule
|
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit 1c9e2d001bce6ea59544c84363e87e38841ea2ea
|
||||||
1
libs/mach-gpu
Submodule
1
libs/mach-gpu
Submodule
|
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit 1266bd935c20d539d74390380364ec566be4eec9
|
||||||
1
libs/mach-gpu-dawn
Submodule
1
libs/mach-gpu-dawn
Submodule
|
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit ad9f4e77a4db6d5e2e635e45db8878eaf7945a88
|
||||||
Loading…
Add table
Add a link
Reference in a new issue