1

I have a CMake library target that outputs a foo.js and foo.wasm file in the build directory. However, when I install() the target, only foo.js appears in the install directory. How can I get CMake to also install foo.wasm? I'm using the Emscripten toolchain to generate WebAssembly.

1 Answer 1

1

Install foo.wasm like this:

install(FILES foo.wasm DESTINATION {your-destination})
Sign up to request clarification or add additional context in comments.

1 Comment

Ended up using: install(FILES ${CMAKE_BINARY_DIR}/foo.wasm DESTINATION ${CMAKE_INSTALL_LIBDIR})

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.