examples: Emscripten builds should allow memory growth.

Otherwise you either need to preallocate a bunch or run out of memory fast.

examples/demo/04-bytepusher runs out of memory at startup without this.
This commit is contained in:
Ryan C. Gordon 2024-11-23 00:01:18 -05:00
parent 212f0dcdb1
commit 61ba8010d3
No known key found for this signature in database
GPG key ID: FA148B892AB48044

View file

@ -110,6 +110,7 @@ macro(add_sdl_example_executable TARGET)
target_link_libraries(${TARGET} PRIVATE GL)
elseif(EMSCRIPTEN)
set_property(TARGET ${TARGET} PROPERTY SUFFIX ".html")
target_link_options(${TARGET} PRIVATE -sALLOW_MEMORY_GROWTH=1)
endif()
if(OPENGL_FOUND)