Skip to content

Commit 7f09985

Browse files
committed
Added xeus-lite dependency in wasm build
1 parent 5bcd1ef commit 7f09985

File tree

2 files changed

+28
-8
lines changed

2 files changed

+28
-8
lines changed

BuildWasmDockerfile

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,7 @@ RUN cd /deps/nlohmannjson/build && \
5252
##################################################################
5353

5454
RUN mkdir -p /deps/xeus/build
55-
RUN git clone --branch 2.4.1 https://github.com/jupyter-xeus/xeus.git /deps/xeus/src
56-
57-
#COPY xeus /deps/xeus/src
55+
RUN git clone --branch 3.0.1 https://github.com/jupyter-xeus/xeus.git /deps/xeus/src
5856

5957
RUN cd /deps/xeus/build && \
6058
emcmake cmake ../src \
@@ -66,6 +64,23 @@ RUN cd /deps/xeus/build && \
6664
RUN cd /deps/xeus/build && \
6765
emmake make -j2 install
6866

67+
##################################################################
68+
# xeus-lite
69+
##################################################################
70+
71+
RUN mkdir -p /deps/xeus-lite/build
72+
RUN git clone https://github.com/jupyter-xeus/xeus-lite.git /deps/xeus-lite/src
73+
74+
RUN cd /deps/xeus-lite/build && \
75+
emcmake cmake ../src \
76+
-DCMAKE_INSTALL_PREFIX=/install \
77+
-Dnlohmann_json_DIR=/install/lib/cmake/nlohmann_json \
78+
-Dxtl_DIR=/install/share/cmake/xtl \
79+
-Dxeus_DIR=/install/lib/cmake/xeus
80+
81+
RUN cd /deps/xeus-lite/build && \
82+
emmake make -j2 install
83+
6984
##################################################################
7085
# xproperty
7186
##################################################################
@@ -86,7 +101,7 @@ RUN cd /deps/xproperty/build && \
86101
##################################################################
87102

88103
RUN mkdir -p /deps/xwidgets/build
89-
RUN git clone --branch 0.26.1 https://github.com/jupyter-xeus/xwidgets.git /deps/xwidgets/src
104+
RUN git clone --branch 0.27.1 https://github.com/jupyter-xeus/xwidgets.git /deps/xwidgets/src
90105

91106
RUN cd /deps/xwidgets/build && \
92107
emcmake cmake ../src \
@@ -106,7 +121,7 @@ RUN cd /deps/xwidgets/build && \
106121
##################################################################
107122

108123
RUN mkdir -p /deps/xcanvas/build
109-
RUN git clone --branch 0.2.2 https://github.com/martinRenou/xcanvas.git /deps/xcanvas/src
124+
RUN git clone --branch 0.4.1 https://github.com/martinRenou/xcanvas.git /deps/xcanvas/src
110125

111126
RUN cd /deps/xcanvas/build && \
112127
emcmake cmake ../src \
@@ -134,15 +149,14 @@ ADD ./xeus-luaConfig.cmake.in /
134149
ADD ./test /test
135150
ADD ./cmake_emscripten /cmake_emscripten
136151

137-
RUN ls /deps/wasm_lua/lua-5.3.4/src/
138-
139152
RUN mkdir -p /xeus-build && cd /xeus-build && \
140153
emcmake cmake .. \
141154
-DCMAKE_INSTALL_PREFIX=/install \
142155
-DXEUS_LUA_EMSCRIPTEN_WASM_BUILD=ON \
143156
-Dxtl_DIR=/install/share/cmake/xtl \
144157
-Dnlohmann_json_DIR=/install/lib/cmake/nlohmann_json \
145158
-Dxeus_DIR=/install/lib/cmake/xeus \
159+
-Dxeus-lite_DIR=/install/lib/cmake/xeus-lite \
146160
-Dxproperty_DIR=/install/lib/cmake/xproperty \
147161
-Dxwidgets_DIR=/install/lib/cmake/xwidgets \
148162
-Dxcanvas_DIR=/install/lib/cmake/xcanvas \

CMakeLists.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,9 @@ macro(xeus_lua_set_kernel_options target_name)
261261
find_package(Threads)
262262
target_link_libraries(${target_name} PRIVATE ${CMAKE_THREAD_LIBS_INIT} ${XEUS_LUA_LUA_LIBRARIES})
263263
else()
264+
include(WasmBuildOptions)
264265
target_link_libraries(${target_name} PRIVATE ${XEUS_LUA_LUA_LIBRARIES})
266+
xeus_wasm_compile_options(${target_name})
265267
endif()
266268
endmacro()
267269

@@ -367,6 +369,7 @@ endif ()
367369

368370
# xeus-lua
369371
# =======
372+
370373
if (XEUS_LUA_BUILD_EXECUTABLE)
371374
find_package(xeus-zmq 1.0.1 REQUIRED)
372375
add_executable(xlua ${XEUS_LUA_MAIN_SRC})
@@ -377,10 +380,13 @@ if (XEUS_LUA_BUILD_EXECUTABLE)
377380
endif()
378381

379382
if(XEUS_LUA_EMSCRIPTEN_WASM_BUILD)
383+
include(WasmBuildOptions)
384+
find_package(xeus-lite REQUIRED)
380385
message(STATUS ${XEUS_LUA_LUA_LIBRARIES})
381386
add_executable(xeus_kernel src/main_emscripten_kernel.cpp )
382-
target_link_libraries(xeus_kernel xeus-lua-static)
387+
target_link_libraries(xeus_kernel xeus-lua-static xeus-lite)
383388
target_compile_features(xeus_kernel PRIVATE cxx_std_17)
389+
xeus_wasm_link_options(xeus_kernel "web,worker")
384390
endif()
385391

386392

0 commit comments

Comments
 (0)