Skip to content

Commit 3f5166e

Browse files
authored
Enable Windows Emscripten build (#362)
* Enable Windows Emscripten build * Try using EMCC_SUFFIX instead of making our own
1 parent 31640e5 commit 3f5166e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ endif()
433433
if(EMSCRIPTEN)
434434
# Ensure required SDL2 ports (e.g. SDL2) are built before header preloading
435435
execute_process(
436-
COMMAND embuilder build sdl2
436+
COMMAND embuilder${EMCC_SUFFIX} build sdl2
437437
RESULT_VARIABLE SDL2_RESULT
438438
)
439439
if(NOT SDL2_RESULT EQUAL 0)
@@ -448,6 +448,8 @@ if(EMSCRIPTEN)
448448
xeus_wasm_link_options(xcpp "web,worker")
449449
string(REPLACE "@" "@@" ESCAPED_SYSROOT_PATH "${SYSROOT_PATH}")
450450
string(REPLACE "@" "@@" ESCAPED_XEUS_CPP_RESOURCE_DIR "${XEUS_CPP_RESOURCE_DIR}")
451+
string(REPLACE "\\" "/" ESCAPED_XEUS_CPP_RESOURCE_DIR "${ESCAPED_XEUS_CPP_RESOURCE_DIR}")
452+
string(REPLACE "\\" "/" ESCAPED_SYSROOT_PATH "${ESCAPED_SYSROOT_PATH}")
451453
target_link_options(xcpp
452454
PUBLIC "SHELL: -s USE_SDL=2"
453455
PUBLIC "SHELL: --preload-file ${ESCAPED_SYSROOT_PATH}/include@/include"

0 commit comments

Comments
 (0)