2022-10-22 12:07:59 +02:00
|
|
|
if (EMSCRIPTEN)
|
|
|
|
add_subdirectory(javascript)
|
2022-12-12 19:17:27 +01:00
|
|
|
|
|
|
|
add_custom_command(
|
|
|
|
OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/javascript/publish.log
|
|
|
|
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/javascript/whisper.js
|
|
|
|
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/javascript/libwhisper.worker.js
|
|
|
|
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/javascript/package.json
|
|
|
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/javascript
|
|
|
|
COMMAND npm publish
|
|
|
|
COMMAND touch publish.log
|
|
|
|
COMMENT "Publishing npm module v${PROJECT_VERSION}"
|
|
|
|
VERBATIM
|
|
|
|
)
|
|
|
|
|
|
|
|
add_custom_target(publish-npm
|
|
|
|
DEPENDS javascript/publish.log
|
|
|
|
)
|
2022-10-22 12:07:59 +02:00
|
|
|
endif()
|