• 此项目
    • 正在载入...
  • Sign in

xuning / sherpaonnx

96x96
转到一个项目
Toggle navigation
  • 项目
  • 群组
  • 代码片段
  • 帮助
Toggle navigation pinning
  • Project
  • Activity
  • Repository
  • Pipelines
  • Graphs
  • Issues 0
  • Merge Requests 0
  • Wiki
  • Network
  • Create a new issue
  • Builds
  • Commits
  • Files
  • Commits
  • Network
  • Compare
  • Branches
  • Tags
Switch branch/tag
  • sherpaonnx
  • scripts
  • node-addon-api
  • run.sh
  • Build sherpa-onnx as a single shared library (#1078) · a2507510 ...
    a2507510 浏览文件
    When `-D BUILD_SHARED_LIBS=ON` is passed to `cmake`, it builds a single shared library.
    
    Specifically, 
    
    - For C APIs, it builds `libsherpa-onnx-c-api.so`
    - For Python APIs, it builds `_sherpa_onnx.cpython-xx-xx.so`
    - For Kotlin and Java APIs, it builds `libsherpa-onnx-jni.so`
    
    There is no `libsherpa-onnx-core.so` any longer.
    
    Note it affects only shared libraries.
    Fangjun Kuang authored 2024-07-06 16:41:54 +0800
run.sh 401 字节
原文件 审查 历史 永久链接
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
#!/usr/bin/env bash

set -ex

if [[ ! -f ../../build/install/lib/libsherpa-onnx-c-api.dylib && ! -f ../../build/install/lib/libsherpa-c-api.so ]]; then
  pushd ../../
  mkdir -p build
  cd build

  cmake \
    -DCMAKE_INSTALL_PREFIX=./install \
    -DBUILD_SHARED_LIBS=ON \
    ..

  make install
  popd
fi
export SHERPA_ONNX_INSTALL_DIR=$PWD/../../build/install

./node_modules/.bin/cmake-js compile