Skip to content

Commit 1ec8c63

Browse files
authored
fix emscripten compile (#38)
1 parent 0f2e9c7 commit 1ec8c63

File tree

1 file changed

+3
-13
lines changed

1 file changed

+3
-13
lines changed

build.zig

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -116,23 +116,13 @@ pub fn build(b: *std.Build) void {
116116
b.installArtifact(imgui);
117117

118118
const emscripten = target.result.os.tag == .emscripten;
119-
if (emscripten) {
120-
imgui.root_module.addCMacro("__EMSCRIPTEN__", "");
121-
// TODO: read from enviroment or `emcc --version`
122-
imgui.root_module.addCMacro("__EMSCRIPTEN_major__", "3");
123-
imgui.root_module.addCMacro("__EMSCRIPTEN_minor__", "1");
124-
imgui.root_module.stack_protector = false;
125-
//imgui.root_module.disable_stack_probing = true;
126-
}
127119

128120
imgui.addIncludePath(b.path("libs"));
129121
imgui.addIncludePath(b.path("libs/imgui"));
130122

131-
if (!emscripten) {
132-
imgui.linkLibC();
133-
if (target.result.abi != .msvc)
134-
imgui.linkLibCpp();
135-
}
123+
imgui.linkLibC();
124+
if (target.result.abi != .msvc)
125+
imgui.linkLibCpp();
136126

137127
imgui.addCSourceFile(.{
138128
.file = b.path("src/zgui.cpp"),

0 commit comments

Comments
 (0)