From 932197a8f4c632107c6ad146c87fcc16dd790d69 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Wed, 8 Apr 2026 11:14:11 -0700
Subject: [PATCH] Added Emscripten source maps for debugging
---
CMakeLists.txt | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3377f913..251f398f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -9,7 +9,7 @@ project(Maelstrom
VERSION "${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}"
)
if(APPLE)
- enable_language(OBJC)
+ enable_language(OBJC)
endif()
# set the output directory for built objects.
@@ -222,6 +222,9 @@ if(EMSCRIPTEN)
# Increase the default stack size
target_link_options(${TARGET_NAME} PRIVATE -sALLOW_MEMORY_GROWTH=1 -sSTACK_SIZE=1048576)
+ # Create a source map for debugging
+ target_link_options(${TARGET_NAME} PRIVATE -gsource-map)
+
# on the web, we have to put the files inside of the webassembly
# somewhat unintuitively, this is done via a linker argument.
target_link_libraries(${TARGET_NAME} PRIVATE