Something went wrong. Try again.
a fantasy console written in Zig
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839const std = @import("std");
pub fn build(b: *std.Build) !void { const target = b.standardTargetOptions(.{}); const optimize = b.standardOptimizeOption(.{});
const exe = b.addExecutable(.{ .name = "zigcon", .root_module = b.createModule(.{ .root_source_file = b.path("src/main.zig"), .target = target, .optimize = optimize, .link_libc = true, }), });
exe.root_module.linkSystemLibrary("SDL3", .{});
const c_trans = b.addTranslateC(.{ .root_source_file = b.path("sdl_includes.h"), .target = target, .optimize = optimize, .link_libc = true, });
if (target.result.os.tag == .linux) { c_trans.addIncludePath(.{ .cwd_relative = "/usr/include" }); c_trans.addIncludePath(.{ .cwd_relative = "/usr/local/include" }); } else if (target.result.os.tag == .macos) { c_trans.addIncludePath(.{ .cwd_relative = "/opt/homebrew/include" }); }
const sdl_module = c_trans.createModule();
exe.root_module.addImport("SDL3", sdl_module);
b.installArtifact(exe);}