Skip to content

VTK JS library files are not found in wasm SDK builds

Compiler error when using VTK.wasm from an install tree:

em++: error: '--js-library=/VTK-src/Rendering/UI/vtkWebAssemblyRenderWindowInteractor.js': file not found: '/VTK-src/Rendering/UI/vtkWebAssemblyRenderWindowInteractor.js'

Context:

Helper javascript files are built by using --js-libary=/path/to/file.js argument of emcc when compiling vtkWebAssemblyRenderWindowInteractor. This compiler flag is set as an INTERFACE option on the RenderingUI module here. However, the path points to the source tree, which isn't great for SDK installs.

Perhaps, VTK should install the .js file and use generator expressions for the correct path when using build/install tree.

Edited by Jaswant Panchumarti (Kitware)