colorful box
This commit is contained in:
66
build.zig
66
build.zig
@@ -14,19 +14,11 @@ pub fn build(b: *std.Build) void {
|
||||
|
||||
const cimgui = b.dependency("cimgui", .{});
|
||||
|
||||
const nu = b.addModule("nu", .{
|
||||
.root_source_file = b.path("src/nu.zig"),
|
||||
.target = target,
|
||||
.optimize = optimize,
|
||||
.link_libc = true,
|
||||
});
|
||||
nu.addImport("cimgui", cimgui.module("cimgui"));
|
||||
nu.addImport("vk", vkmod);
|
||||
nu.linkSystemLibrary("glfw3", .{
|
||||
.needed = true,
|
||||
.preferred_link_mode = .static,
|
||||
.use_pkg_config = .force,
|
||||
});
|
||||
// nu.linkSystemLibrary("glfw3", .{
|
||||
// .needed = true,
|
||||
// .preferred_link_mode = .static,
|
||||
// .use_pkg_config = .force,
|
||||
// });
|
||||
|
||||
const exe = b.addExecutable(.{
|
||||
.name = "scratchzig",
|
||||
@@ -34,9 +26,15 @@ pub fn build(b: *std.Build) void {
|
||||
.target = target,
|
||||
.optimize = optimize,
|
||||
});
|
||||
exe.root_module.addImport("nu", nu);
|
||||
// exe.root_module.addImport("nu", nu);
|
||||
exe.root_module.addImport("vk", vkmod);
|
||||
exe.root_module.addImport("cimgui", cimgui.module("cimgui"));
|
||||
exe.root_module.linkSystemLibrary("glfw3", .{
|
||||
.needed = true,
|
||||
.preferred_link_mode = .static,
|
||||
.use_pkg_config = .force,
|
||||
});
|
||||
exe.linkLibC();
|
||||
|
||||
const shaders = vkgen.ShaderCompileStep.create(
|
||||
b,
|
||||
@@ -59,42 +57,6 @@ pub fn build(b: *std.Build) void {
|
||||
const run_step = b.step("run", "Run the app");
|
||||
run_step.dependOn(&run_cmd.step);
|
||||
|
||||
const nu_unit_tests = b.addTest(.{
|
||||
.root_source_file = b.path("src/nu.zig"),
|
||||
.target = target,
|
||||
.optimize = optimize,
|
||||
});
|
||||
nu_unit_tests.root_module.addImport("cimgui", cimgui.module("cimgui"));
|
||||
nu_unit_tests.root_module.addImport("vk", vkmod);
|
||||
nu_unit_tests.root_module.linkSystemLibrary("glfw3", .{
|
||||
.needed = true,
|
||||
.preferred_link_mode = .static,
|
||||
.use_pkg_config = .force,
|
||||
});
|
||||
nu_unit_tests.linkLibC();
|
||||
|
||||
const nu_test_runner = b.addInstallArtifact(nu_unit_tests, .{
|
||||
.dest_dir = .{ .override = .{ .custom = "dev" } },
|
||||
.dest_sub_path = "nu_test_runner",
|
||||
});
|
||||
|
||||
const devel_step = b.step("dev", "Build development tools and test runners");
|
||||
devel_step.dependOn(&nu_test_runner.step);
|
||||
|
||||
// const exe_unit_tests = b.addTest(.{
|
||||
// .root_source_file = b.path("src/main.zig"),
|
||||
// .target = target,
|
||||
// .optimize = optimize,
|
||||
// });
|
||||
// exe_unit_tests.linkSystemLibrary2("glfw3", .{
|
||||
// .needed = true,
|
||||
// .preferred_link_mode = .static,
|
||||
// .use_pkg_config = .force,
|
||||
// });
|
||||
// exe_unit_tests.linkLibC();
|
||||
// const run_exe_unit_tests = b.addRunArtifact(exe_unit_tests);
|
||||
|
||||
// const test_step = b.step("test", "Run unit tests");
|
||||
// test_step.dependOn(&run_exe_unit_tests.step);
|
||||
// test_step.dependOn(&run_nu_unit_tests.step);
|
||||
// const devel_step = b.step("dev", "Build development tools and test runners");
|
||||
// devel_step.dependOn(&nu_test_runner.step);
|
||||
}
|
||||
|
Reference in New Issue
Block a user