@@ -111,14 +111,18 @@ find_package(pugixml REQUIRED)
111
111
# Configuration
112
112
# =============
113
113
114
+ if (NOT DEFINED XEUS_CPP_RESOURCE_DIR )
115
+ set (XEUS_CPP_RESOURCE_DIR "${CMAKE_INSTALL_PREFIX} /${CMAKE_INSTALL_LIBDIR} /clang/${CPPINTEROP_LLVM_VERSION_MAJOR} " )
116
+ message (STATUS "Using clang resource dir headers from ${XEUS_CPP_RESOURCE_DIR} " )
117
+ endif ()
118
+
114
119
if (NOT DEFINED XEUS_CPP_KERNELSPEC_PATH )
115
120
set (XEUS_CPP_KERNELSPEC_PATH "${CMAKE_INSTALL_PREFIX} /${CMAKE_INSTALL_BINDIR} /" )
116
121
endif ()
117
122
118
123
function (configure_native_kernel kernel )
119
124
set (XEUS_CPP_PATH "$ENV{PATH} " )
120
125
set (XEUS_CPP_LD_LIBRARY_PATH "$ENV{LD_LIBRARY_PATH} " )
121
- set (XEUS_CPP_RESOURCE_DIR ${CMAKE_INSTALL_PREFIX} /${CMAKE_INSTALL_LIBDIR}/clang/${CPPINTEROP_LLVM_VERSION_MAJOR} )
122
126
set (XEUS_CPP_INCLUDE_DIR ${CMAKE_INSTALL_PREFIX} /include )
123
127
124
128
if (WIN32 )
@@ -169,7 +173,6 @@ endfunction()
169
173
170
174
message ("Configure kernels: ..." )
171
175
if (EMSCRIPTEN )
172
- set (XEUS_CPP_RESOURCE_DIR "/lib/clang/${CPPINTEROP_LLVM_VERSION_MAJOR} " )
173
176
configure_wasm_kernel ("/share/jupyter/kernels/xcpp17/" )
174
177
configure_wasm_kernel ("/share/jupyter/kernels/xcpp20/" )
175
178
configure_wasm_kernel ("/share/jupyter/kernels/xcpp23/" )
@@ -438,7 +441,7 @@ if(EMSCRIPTEN)
438
441
target_link_options (xcpp
439
442
PUBLIC "SHELL: -s USE_SDL=2"
440
443
PUBLIC "SHELL: --preload-file ${SYSROOT_PATH} /include@/include"
441
- PUBLIC "SHELL: --preload-file ${CMAKE_INSTALL_PREFIX}${XEUS_CPP_RESOURCE_DIR} @ ${XEUS_CPP_RESOURCE_DIR } "
444
+ PUBLIC "SHELL: --preload-file ${XEUS_CPP_RESOURCE_DIR} @/ ${CMAKE_INSTALL_LIBDIR} /clang/ ${CPPINTEROP_LLVM_VERSION_MAJOR } "
442
445
PUBLIC "SHELL: --preload-file ${XEUS_CPP_DATA_DIR} @/share/xeus-cpp"
443
446
PUBLIC "SHELL: --preload-file ${XEUS_CPP_CONF_DIR} @/etc/xeus-cpp"
444
447
PUBLIC "SHELL: --post-js ${CMAKE_CURRENT_SOURCE_DIR} /wasm_patches/post.js"
@@ -535,4 +538,4 @@ if(EMSCRIPTEN)
535
538
"$<TARGET_FILE_DIR:xcpp>/xcpp.wasm"
536
539
"$<TARGET_FILE_DIR:xcpp>/xcpp.data"
537
540
DESTINATION ${CMAKE_INSTALL_BINDIR} )
538
- endif ()
541
+ endif ()
0 commit comments