chore: SDL2.zig expects target to be set before link() is called

This commit is contained in:
Rekai Nyangadzayi Musuka 2022-09-23 05:21:09 -03:00
parent c697dec716
commit c71e954748
1 changed files with 2 additions and 2 deletions

View File

@ -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");
@ -29,10 +31,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();