Browse Source

doc: no, UseEmscripten isn't available implicitly anymore.

pull/525/head
Vladimír Vondruš 5 years ago
parent
commit
94ef28da27
  1. 3
      doc/platforms-html5.dox

3
doc/platforms-html5.dox

@ -438,13 +438,14 @@ bundle shader code etc., as shown in the @ref examples-textured-triangle
example). In this case the file is compiled directly into the `*.wasm` binary, example). In this case the file is compiled directly into the `*.wasm` binary,
which is the most optimal way, but it means you need to port your code away which is the most optimal way, but it means you need to port your code away
from the usual filesystem APIs. Another possibility is via the from the usual filesystem APIs. Another possibility is via the
@cmake emscripten_embed_file() @ce CMake macro, which is implicitly available @cmake emscripten_embed_file() @ce CMake macro, which is available
when you build for Emscripten, coming from the [UseEmscripten.cmake](https://github.com/mosra/toolchains/blob/master/modules/UseEmscripten.cmake) when you build for Emscripten, coming from the [UseEmscripten.cmake](https://github.com/mosra/toolchains/blob/master/modules/UseEmscripten.cmake)
module: module:
@code{.cmake} @code{.cmake}
add_executable(MyApplication main.cpp) add_executable(MyApplication main.cpp)
if(CORRADE_TARGET_EMSCRIPTEN) if(CORRADE_TARGET_EMSCRIPTEN)
include(UseEmscripten)
emscripten_embed_file(MyApplication file.dat /path/in/virtual/fs/file.dat) emscripten_embed_file(MyApplication file.dat /path/in/virtual/fs/file.dat)
endif() endif()
@endcode @endcode

Loading…
Cancel
Save