mirror of
https://github.com/ggerganov/ggwave.git
synced 2026-02-07 01:11:22 +08:00
* 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
25 lines
507 B
CMake
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
|
|
)
|