From f2fe271198554ce5a3c18676d57dddf4b030e0ab Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Fri, 6 Aug 2021 17:31:42 +0300 Subject: Add support for finding Javascript source libraries with Emscripten. --- docs/markdown/snippets/wasmlibs.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 docs/markdown/snippets/wasmlibs.md (limited to 'docs') diff --git a/docs/markdown/snippets/wasmlibs.md b/docs/markdown/snippets/wasmlibs.md new file mode 100644 index 000000000..15434d122 --- /dev/null +++ b/docs/markdown/snippets/wasmlibs.md @@ -0,0 +1,13 @@ +## Add support for `find_library` in Emscripten + +The `find_library` method can be used to find your own JavaScript +libraries. The limitation is that they must have the file extension +`.js`. Other library lookups will look up "native" libraries from the +system like currently. A typical usage would look like this: + +```meson +glue_lib = cc.find_library('gluefuncs.js', + dirs: meson.current_source_dir()) +executable('prog', 'prog.c', + dependencies: glue_lib) +``` -- cgit v1.2.3