Fix zig compileRaylib target to emscripten

This commit is contained in:
Maicon Santana 2025-10-07 09:47:10 +00:00
parent f0ffdb33f4
commit 21a40229f5

View File

@ -386,6 +386,8 @@ fn compileRaylib(b: *std.Build, target: std.Build.ResolvedTarget, optimize: std.
setDesktopPlatform(raylib, options.platform); setDesktopPlatform(raylib, options.platform);
}, },
.emscripten => { .emscripten => {
const activate_emsdk_step = emsdk.zemscripten.activateEmsdkStep(b);
raylib.step.dependOn(activate_emsdk_step);
raylib.root_module.addCMacro("PLATFORM_WEB", ""); raylib.root_module.addCMacro("PLATFORM_WEB", "");
if (options.opengl_version == .auto) { if (options.opengl_version == .auto) {
raylib.root_module.addCMacro("GRAPHICS_API_OPENGL_ES3", ""); raylib.root_module.addCMacro("GRAPHICS_API_OPENGL_ES3", "");