Merge pull request #19 from speedy-lex/install-headers

install neonucleus.h into zig-out
This commit is contained in:
Quantum Tomato 2025-07-03 15:00:59 +02:00 committed by GitHub
commit 2d4bec8734
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -88,6 +88,8 @@ pub fn build(b: *std.Build) void {
const optimize = b.standardOptimizeOption(.{}); const optimize = b.standardOptimizeOption(.{});
const includeFiles = b.addInstallHeaderFile(b.path("src/neonucleus.h"), "neonucleus.h");
const engineStatic = b.addStaticLibrary(.{ const engineStatic = b.addStaticLibrary(.{
.name = "neonucleus", .name = "neonucleus",
//.root_source_file = b.path("src/engine.zig"), //.root_source_file = b.path("src/engine.zig"),
@ -107,10 +109,12 @@ pub fn build(b: *std.Build) void {
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(&includeFiles.step);
engineStep.dependOn(&b.addInstallArtifact(engineStatic, .{}).step); engineStep.dependOn(&b.addInstallArtifact(engineStatic, .{}).step);
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(&includeFiles.step);
sharedStep.dependOn(&b.addInstallArtifact(engineShared, .{}).step); sharedStep.dependOn(&b.addInstallArtifact(engineShared, .{}).step);
const emulator = b.addExecutable(.{ const emulator = b.addExecutable(.{