Skip to content

Discussing accessibility for xcpp header files for lite #310

Open
@anutosh491

Description

@anutosh491

Hey @SylvainCorlay,

Currently for lite, after the install step we have this

-- Install configuration: "Release"
-- Installing: /Users/runner/micromamba/envs/xeus-cpp-wasm-host/share/xeus-cpp/tagfiles
-- Installing: /Users/runner/micromamba/envs/xeus-cpp-wasm-host/share/xeus-cpp/tagfiles/cppreference-doxygen-web.tag
-- Installing: /Users/runner/micromamba/envs/xeus-cpp-wasm-host/etc/xeus-cpp/tags.d
-- Installing: /Users/runner/micromamba/envs/xeus-cpp-wasm-host/etc/xeus-cpp/tags.d/stl.json
-- Installing: /Users/runner/micromamba/envs/xeus-cpp-wasm-host/share/jupyter/kernels
-- Installing: /Users/runner/micromamba/envs/xeus-cpp-wasm-host/share/jupyter/kernels/xcpp23
..........
-- Installing: /Users/runner/micromamba/envs/xeus-cpp-wasm-host/lib/cmake/xeus-cpp/xeus-cppConfig.cmake
-- Installing: /Users/runner/micromamba/envs/xeus-cpp-wasm-host/lib/cmake/xeus-cpp/xeus-cppConfigVersion.cmake
-- Installing: /Users/runner/micromamba/envs/xeus-cpp-wasm-host/bin/xcpp.js
-- Installing: /Users/runner/micromamba/envs/xeus-cpp-wasm-host/bin/xcpp.wasm
-- Installing: /Users/runner/micromamba/envs/xeus-cpp-wasm-host/bin/xcpp.data

So currently how we deal with xcpp/xdisplay.hpp and xcpp/xmime.hpp is this

xeus-cpp/CMakeLists.txt

Lines 385 to 392 in 97daaeb

if (EMSCRIPTEN)
execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${SYSROOT_PATH}/include/xcpp)
message(STATUS "Moving headers to ${SYSROOT_PATH}/include/xcpp")
foreach(header ${XCPP_HEADERS})
file(COPY ${header} DESTINATION ${SYSROOT_PATH}/include/xcpp)
endforeach()
else ()

So we take these headers, move them into sysroot/include/xcpp (and we load sysroot below)

xeus-cpp/CMakeLists.txt

Lines 438 to 440 in 97daaeb

target_link_options(xcpp
PUBLIC "SHELL: -s USE_SDL=2"
PUBLIC "SHELL: --preload-file ${SYSROOT_PATH}/include@/include"

These end up in xcpp.data and when the .data file is loaded at runtime we can access the xdisplay header.

Am I not sure this should be the natural way for us to access this in lite.

  1. Why don't we install it in Prefix/include/xcpp/**
  2. And let empack do the rest of the job ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions