File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -75,6 +75,8 @@ if(XEUS_CPP_ENABLE_CODE_COVERAGE AND CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
75
75
endif ()
76
76
77
77
if (EMSCRIPTEN)
78
+ # Other options
79
+ option (LLVM_RESOURCE_DIR "Emscripten LLVM resource directory" "unknown" )
78
80
add_compile_definitions (XEUS_CPP_EMSCRIPTEN_WASM_BUILD)
79
81
message ("Build with emscripten" )
80
82
set (XEUS_CPP_BUILD_STATIC ON )
@@ -435,10 +437,14 @@ if(EMSCRIPTEN)
435
437
xeus_cpp_set_kernel_options(xcpp)
436
438
xeus_wasm_compile_options(xcpp)
437
439
xeus_wasm_link_options(xcpp "web,worker" )
440
+ if (NOT DEFINED LLVM_RESOURCE_DIR)
441
+ set (LLVM_RESOURCE_DIR ${CMAKE_INSTALL_PREFIX}${XEUS_CPP_RESOURCE_DIR} )
442
+ message (STATUS "LLVM_RESOURCE_DIR not defined, using fallback value: ${CMAKE_INSTALL_PREFIX}${XEUS_CPP_RESOURCE_DIR} " )
443
+ endif ()
438
444
target_link_options (xcpp
439
445
PUBLIC "SHELL: -s USE_SDL=2"
440
446
PUBLIC "SHELL: --preload-file ${SYSROOT_PATH} /include@/include"
441
- PUBLIC "SHELL: --preload-file ${CMAKE_INSTALL_PREFIX}${XEUS_CPP_RESOURCE_DIR} @${XEUS_CPP_RESOURCE_DIR } "
447
+ PUBLIC "SHELL: --preload-file ${LLVM_RESOURCE_DIR} @${LLVM_RESOURCE_DIR } "
442
448
PUBLIC "SHELL: --preload-file ${XEUS_CPP_DATA_DIR} @/share/xeus-cpp"
443
449
PUBLIC "SHELL: --preload-file ${XEUS_CPP_CONF_DIR} @/etc/xeus-cpp"
444
450
PUBLIC "SHELL: --post-js ${CMAKE_CURRENT_SOURCE_DIR} /wasm_patches/post.js"
You can’t perform that action at this time.
0 commit comments