hide console on windows

This commit is contained in:
Rokas Puzonas 2025-12-30 04:19:18 +02:00
parent 6809b5538c
commit 8b7c50375c

View File

@ -7,6 +7,7 @@ pub fn build(b: *std.Build) !void {
const has_imgui = b.option(bool, "imgui", "ImGui integration") orelse (optimize == .Debug);
const has_tracy = b.option(bool, "tracy", "Tracy integration") orelse (optimize == .Debug);
const has_console = b.option(bool, "console", "Show console (Window only)") orelse (optimize == .Debug);
const exe = b.addExecutable(.{
.name = "game_2025_12_13",
@ -80,6 +81,10 @@ pub fn build(b: *std.Build) !void {
}
}
if (target.result.os.tag == .windows) {
exe.subsystem = if (has_console) .Console else .Windows;
}
var options = b.addOptions();
options.addOption(bool, "has_imgui", has_imgui);
options.addOption(bool, "has_tracy", has_tracy);