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:
13
.github/workflows/linux-gpu.yaml
vendored
13
.github/workflows/linux-gpu.yaml
vendored
@@ -72,7 +72,12 @@ jobs:
|
||||
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -D CMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_INSTALL_PREFIX=./install -DBUILD_SHARED_LIBS=ON -DSHERPA_ONNX_ENABLE_GPU=ON ..
|
||||
cmake \
|
||||
-D CMAKE_BUILD_TYPE=${{ matrix.build_type }} \
|
||||
-D CMAKE_INSTALL_PREFIX=./install \
|
||||
-D BUILD_SHARED_LIBS=ON \
|
||||
-D SHERPA_ONNX_ENABLE_GPU=ON \
|
||||
..
|
||||
|
||||
- name: Build sherpa-onnx for ubuntu
|
||||
shell: bash
|
||||
@@ -86,6 +91,12 @@ jobs:
|
||||
ls -lh lib
|
||||
ls -lh bin
|
||||
|
||||
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