Added sokol

This commit is contained in:
nothke
2024-06-09 01:02:26 +02:00
parent e20cc4cb24
commit ee4ebf70a5
2 changed files with 8 additions and 28 deletions

View File

@@ -4,17 +4,10 @@ const std = @import("std");
// declaratively construct a build graph that will be executed by an external
// runner.
pub fn build(b: *std.Build) void {
// Standard target options allows the person running `zig build` to choose
// what target to build for. Here we do not override the defaults, which
// means any target is allowed, and the default is native. Other options
// for restricting supported target set are available.
const target = b.standardTargetOptions(.{});
// Standard optimization options allow the person running `zig build` to select
// between Debug, ReleaseSafe, ReleaseFast, and ReleaseSmall. Here we do not
// set a preferred release mode, allowing the user to decide how to optimize.
const optimize = b.standardOptimizeOption(.{});
const dep_sokol = b.dependency("sokol", .{ .target = target, .optimize = optimize });
const exe = b.addExecutable(.{
.name = "sok",
@@ -23,6 +16,8 @@ pub fn build(b: *std.Build) void {
.optimize = optimize,
});
exe.root_module.addImport("sokol", dep_sokol.module("sokol"));
// This declares intent for the executable to be installed into the
// standard location when the user invokes the "install" step (the default
// step when running `zig build`).