Files
ggwave/bindings/javascript/CMakeLists.txt
Georgi Gerganov 19f353018d Javascript bindings (#14)
* Initial version ready

- bindings are in `bindings/emscripten.cpp`
- minimal Javascript example is in `examples/ggwave-js`

* add npm package + add test-ggwave.js

* js : rename export name to "ggwave_factory"

* update to v0.1.5

* Update README.md

* npm : add npm-publish target
2021-01-24 17:25:58 +02:00

25 lines
507 B
CMake

set(TARGET libggwave)
add_executable(${TARGET}
emscripten.cpp
)
target_link_libraries(${TARGET} PRIVATE
ggwave
)
set_target_properties(${TARGET} PROPERTIES LINK_FLAGS " \
--bind \
-s MODULARIZE=1 \
-s SINGLE_FILE=1 \
-s ALLOW_MEMORY_GROWTH=1 \
-s EXPORT_NAME=\"'ggwave_factory'\" \
")
add_custom_command(
TARGET libggwave POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy
${CMAKE_BINARY_DIR}/bin/libggwave.js
${CMAKE_CURRENT_SOURCE_DIR}/ggwave.js
)