emscripten-core / emscripten-core/emscripten
Using Emscripten in CMake doesn't output html
- Dominant language
- C++
- Stars
- 27.6k
- Forks
- 3.6k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 105
Description
**Version of emscripten/emsdk:**
emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 3.1.25 (febd44b21ecaca86e2cb2a25ef3ed4a0a2076365)
clang version 16.0.0 (https://github.com/llvm/llvm-project effd75bda4b1a9b26e554c1cda3e3b4c72fa0aa8)
Target: wasm32-unknown-emscripten
Thread model: posix
InstalledDir: D:\sdk\emsdk\upstream\bin
I am trying to add emscripten support to my project, but when I specify `-o output.html` in `target_link_options`, it doesn't output a html file, but a js and a wasm file
Using `set(CMAKE_EXECUTABLE_SUFFIX ".html")` also doesn't work
The CMakeLists.txt snippet
```
set(CMAKE_TOOLCHAIN_FILE $ENV{EMSDK_HOME}/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake)
set(CMAKE_EXECUTABLE_SUFFIX ".html")
set(LINK_OPTIONS ${LINK_OPTIONS} -o output.html -sMIN_WEBGL_VERSION=2 -sMAX_WEBGL_VERSION=2 -sUSE_GLFW=3 -sWASM=1)
set(LINK_LIBRARIES ${LINK_LIBRARIES} -lglfw3 -lGLESv2 -lEGL)
```
Contributor guide
Assessment
This issue has not been assessed yet.