Skip to content

Commit

Permalink
Fix emscripten preload file.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArthurSonzogni committed May 27, 2022
1 parent 6c88238 commit ebb2457
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -215,13 +215,16 @@ if (EMSCRIPTEN)

foreach(file
"index.html"
"run_webassembly.py")
configure_file(${file} ${file})
"run_webassembly.py"
"resources/background.ogg"
"resources/bounce.wav"
"resources/termBreaker")
configure_file(${file} ${file} COPYONLY)
endforeach(file)

# Make the resources files available to the browser.
set_property(TARGET termBreaker
APPEND_STRING PROPERTY LINK_FLAGS "--preload-file ../resources/")
set_property(TARGET termBreaker APPEND_STRING PROPERTY LINK_FLAGS
"--preload-file ${CMAKE_CURRENT_BINARY_DIR}/resources/@/resources/")
endif()

if (ENABLE_AUDIO)
Expand Down

0 comments on commit ebb2457

Please sign in to comment.