Build sherpa-onnx as a single shared library (#1078)
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.
This commit is contained in:
14
.github/workflows/linux-jni.yaml
vendored
14
.github/workflows/linux-jni.yaml
vendored
@@ -95,7 +95,13 @@ jobs:
|
||||
mkdir build
|
||||
cd build
|
||||
|
||||
cmake -DSHERPA_ONNX_ENABLE_TTS=ON -D CMAKE_BUILD_TYPE=Release -D BUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX=./install -DSHERPA_ONNX_ENABLE_JNI=ON ..
|
||||
cmake \
|
||||
-D SHERPA_ONNX_ENABLE_TTS=ON \
|
||||
-D CMAKE_BUILD_TYPE=Release \
|
||||
-D BUILD_SHARED_LIBS=ON \
|
||||
-D CMAKE_INSTALL_PREFIX=./install \
|
||||
-D SHERPA_ONNX_ENABLE_JNI=ON \
|
||||
..
|
||||
|
||||
make -j2
|
||||
make install
|
||||
@@ -105,6 +111,12 @@ jobs:
|
||||
rm -rf ./install/pkgconfig
|
||||
rm -rf ./install/share
|
||||
|
||||
echo "----"
|
||||
ls -lh install/lib
|
||||
|
||||
echo "----"
|
||||
ls -lh install/bin
|
||||
|
||||
- name: Display dependencies of sherpa-onnx for linux
|
||||
shell: bash
|
||||
run: |
|
||||
|
||||
Reference in New Issue
Block a user