File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -166,6 +166,7 @@ if test -z "$nobuild"; then
166166 # Single project: build and install just that project.
167167 make preset=" $preset " " $project "
168168 cmake --install " $cmakedir " --component " $project " /web --config Debug
169+ cmake --install " $cmakedir " --component generic/web --config Debug
169170 else
170171 # Otherwise, build and install everything.
171172 make preset=" $preset " install
Original file line number Diff line number Diff line change @@ -187,7 +187,13 @@ function(HamSandwich_add_executable target_name)
187187
188188 target_link_libraries ("${target_name} " idbfs.js )
189189 if (CMAKE_BUILD_TYPE STREQUAL "Debug" )
190- target_link_options ("${target_name} " PRIVATE --emrun )
190+ target_link_options ("${target_name} " PRIVATE --emrun -gsource-map )
191+ install (
192+ FILES
193+ "${CMAKE_CURRENT_BINARY_DIR } /${target_name} .wasm.map"
194+ DESTINATION "."
195+ COMPONENT "${target_name} /web"
196+ )
191197 endif ()
192198
193199 install (
@@ -296,3 +302,15 @@ else()
296302 function (msvc_compile_options )
297303 endfunction ()
298304endif ()
305+
306+ # Emscripten source map links
307+ if (EMSCRIPTEN AND CMAKE_BUILD_TYPE STREQUAL "Debug" )
308+ install (
309+ CODE [[
310+ file(CREATE_LINK "${CMAKE_SOURCE_DIR}/source" "${CMAKE_INSTALL_PREFIX}/source" SYMBOLIC)
311+ file(CREATE_LINK "${CMAKE_SOURCE_DIR}/external" "${CMAKE_INSTALL_PREFIX}/external" SYMBOLIC)
312+ file(CREATE_LINK "${CMAKE_SOURCE_DIR}/external/emsdk/upstream" "${CMAKE_INSTALL_PREFIX}/emsdk" SYMBOLIC)
313+ ]]
314+ COMPONENT generic/web
315+ )
316+ endif ()
You can’t perform that action at this time.
0 commit comments