Skip to content

Commit

Permalink
build.zig: rename 'imgui' option to 'with_sokol_imgui', rename sokol …
Browse files Browse the repository at this point in the history
…clib to 'sokol_clib'
  • Loading branch information
floooh committed Jun 1, 2024
1 parent 7fec5da commit 143edd4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ pub fn build(b: *Build) !void {
const opt_use_x11 = b.option(bool, "x11", "Force X11 (default: true, Linux only)") orelse true;
const opt_use_wayland = b.option(bool, "wayland", "Force Wayland (default: false, Linux only, not supported in main-line headers)") orelse false;
const opt_use_egl = b.option(bool, "egl", "Force EGL (default: false, Linux only)") orelse false;
const opt_with_sokol_imgui = b.option(bool, "imgui", "Add support for sokol_imgui.h bindings") orelse false;
const opt_with_sokol_imgui = b.option(bool, "with_sokol_imgui", "Add support for sokol_imgui.h bindings") orelse false;
const sokol_backend: SokolBackend = if (opt_use_gl) .gl else if (opt_use_wgpu) .wgpu else .auto;

const target = b.standardTargetOptions(.{});
Expand Down Expand Up @@ -159,14 +159,14 @@ pub const LibSokolOptions = struct {
};
pub fn buildLibSokol(b: *Build, options: LibSokolOptions) !*Build.Step.Compile {
const lib = b.addStaticLibrary(.{
.name = "sokol",
.name = "sokol_clib",
.target = options.target,
.optimize = options.optimize,
.link_libc = true,
});

// installArtifact allows us to find the lib_sokol compile step when
// sokol is used as package manager dependency via 'dep_sokol.artifact("sokol")'
// sokol is used as package manager dependency via 'dep_sokol.artifact("sokol_clib")'
b.installArtifact(lib);

if (options.target.result.isWasm()) {
Expand Down

0 comments on commit 143edd4

Please sign in to comment.