mirror of
https://github.com/NeoFlock/neonucleus.git
synced 2025-09-24 09:03:32 +02:00
fix the build script
This commit is contained in:
parent
6bf8785a85
commit
f38116fd50
11
build.zig
11
build.zig
@ -80,10 +80,6 @@ pub fn build(b: *std.Build) void {
|
|||||||
|
|
||||||
addEngineSources(engineStatic);
|
addEngineSources(engineStatic);
|
||||||
|
|
||||||
const install = b.getInstallStep();
|
|
||||||
|
|
||||||
b.installArtifact(engineStatic);
|
|
||||||
|
|
||||||
const engineShared = b.addSharedLibrary(.{
|
const engineShared = b.addSharedLibrary(.{
|
||||||
.name = "neonucleus",
|
.name = "neonucleus",
|
||||||
.target = target,
|
.target = target,
|
||||||
@ -92,15 +88,11 @@ pub fn build(b: *std.Build) void {
|
|||||||
|
|
||||||
addEngineSources(engineShared);
|
addEngineSources(engineShared);
|
||||||
|
|
||||||
b.installArtifact(engineShared);
|
|
||||||
|
|
||||||
const engineStep = b.step("engine", "Builds the engine as a static library");
|
const engineStep = b.step("engine", "Builds the engine as a static library");
|
||||||
engineStep.dependOn(&engineStatic.step);
|
engineStep.dependOn(&engineStatic.step);
|
||||||
engineStep.dependOn(install);
|
|
||||||
|
|
||||||
const sharedStep = b.step("shared", "Builds the engine as a shared library");
|
const sharedStep = b.step("shared", "Builds the engine as a shared library");
|
||||||
sharedStep.dependOn(&engineShared.step);
|
sharedStep.dependOn(&engineShared.step);
|
||||||
sharedStep.dependOn(install);
|
|
||||||
|
|
||||||
const emulator = b.addExecutable(.{
|
const emulator = b.addExecutable(.{
|
||||||
.name = "neonucleus",
|
.name = "neonucleus",
|
||||||
@ -129,13 +121,10 @@ pub fn build(b: *std.Build) void {
|
|||||||
// forces us to link in everything too
|
// forces us to link in everything too
|
||||||
emulator.linkLibrary(engineStatic);
|
emulator.linkLibrary(engineStatic);
|
||||||
|
|
||||||
b.installArtifact(emulator);
|
|
||||||
b.step("emulator", "Builds the emulator").dependOn(&emulator.step);
|
b.step("emulator", "Builds the emulator").dependOn(&emulator.step);
|
||||||
|
|
||||||
const run_cmd = b.addRunArtifact(emulator);
|
const run_cmd = b.addRunArtifact(emulator);
|
||||||
|
|
||||||
run_cmd.step.dependOn(install);
|
|
||||||
|
|
||||||
if (b.args) |args| {
|
if (b.args) |args| {
|
||||||
run_cmd.addArgs(args);
|
run_cmd.addArgs(args);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user