When building a C++/web-assembly project with CMake and emscripten, the install
command for the target only install the .js
file and not the .wasm
file.
install(TARGETS MyTarget RUNTIME DESTINATION ${CMAKE_BINARY_DIR}/dist)
This will install the JS file only. I tried to add rules for LIBRARY
, RESOURCE
, ARCHIVE
... but the Wasm is never copied. I could not find anything in the official doc.
I know it's easy to workaround using the install(FILES ...
command to force the copy of the wasm, but is there no way to make the standard install work for both files? They are both needed as a target...