From 8d5b459b4b87fd76856fe97d7b60ed72b5dcd919 Mon Sep 17 00:00:00 2001 From: Rekai Musuka Date: Fri, 23 Sep 2022 05:21:09 -0300 Subject: [PATCH] chore: SDL2.zig expects target to be set before link() is called --- build.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.zig b/build.zig index dbaf6d3..0f71152 100644 --- a/build.zig +++ b/build.zig @@ -13,6 +13,8 @@ pub fn build(b: *std.build.Builder) void { const mode = b.standardReleaseOptions(); const exe = b.addExecutable("zba", "src/main.zig"); + exe.setTarget(target); + // Known Folders (%APPDATA%, XDG, etc.) exe.addPackagePath("known_folders", "lib/known-folders/known-folders.zig"); @@ -32,10 +34,8 @@ pub fn build(b: *std.build.Builder) void { // Zig SDL Bindings: https://github.com/MasterQ32/SDL.zig const sdk = Sdk.init(b); sdk.link(exe, .dynamic); - exe.addPackage(sdk.getNativePackage("sdl2")); - exe.setTarget(target); exe.setBuildMode(mode); exe.install();