diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 261da69..3242bef 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -16,6 +16,14 @@ if(XEUS_LITE_BUILD_NODE_TESTS) endif() if(XEUS_LITE_BUILD_BROWSER_TEST_KERNEL) + +include(GNUInstallDirs) + + configure_file ( + "${CMAKE_CURRENT_SOURCE_DIR}/kernel.json.in" + "${CMAKE_CURRENT_SOURCE_DIR}/kernel.json" + ) + add_executable(xlite main_emscripten_wasm.cpp xmock_interpreter.cpp) target_link_libraries(xlite PRIVATE xeus-lite) xeus_wasm_compile_options(xlite) @@ -23,10 +31,14 @@ if(XEUS_LITE_BUILD_BROWSER_TEST_KERNEL) SET(KERNEL_INSTALL_DIR "share/jupyter/kernels/xlite") - install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/logo-64x64.png" + install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/logo-64x64.png" "${CMAKE_CURRENT_SOURCE_DIR}/logo-32x32.png" - "$/xlite.wasm" - "$/xlite.js" "${CMAKE_CURRENT_SOURCE_DIR}/kernel.json" DESTINATION ${KERNEL_INSTALL_DIR}) + + install(FILES + "$/xlite.js" + "$/xlite.wasm" + DESTINATION ${CMAKE_INSTALL_BINDIR} + ) endif() diff --git a/test/kernel.json b/test/kernel.json.in similarity index 76% rename from test/kernel.json rename to test/kernel.json.in index cec87ea..7a20289 100644 --- a/test/kernel.json +++ b/test/kernel.json.in @@ -1,13 +1,12 @@ { "display_name": "XLite", "argv": [ - "xlite", + "@CMAKE_INSTALL_FULL_BINDIR@/xlite", "-f", "{connection_file}" ], "language": "lua", "metadata": { - "wasm_name" : "xlite" } } \ No newline at end of file