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.
21 lines
401 B
Bash
Executable File
21 lines
401 B
Bash
Executable File
#!/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
|