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:
12
.github/workflows/windows-x86.yaml
vendored
12
.github/workflows/windows-x86.yaml
vendored
@@ -63,14 +63,20 @@ jobs:
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -A Win32 -DSHERPA_ONNX_ENABLE_TTS=${{ matrix.with_tts }} -D CMAKE_BUILD_TYPE=Release -D BUILD_SHARED_LIBS=${{ matrix.shared_lib }} -D CMAKE_INSTALL_PREFIX=./install ..
|
||||
cmake \
|
||||
-A Win32 \
|
||||
-DSHERPA_ONNX_ENABLE_TTS=${{ matrix.with_tts }} \
|
||||
-D CMAKE_BUILD_TYPE=Release \
|
||||
-D BUILD_SHARED_LIBS=${{ matrix.shared_lib }} \
|
||||
-D CMAKE_INSTALL_PREFIX=./install \
|
||||
..
|
||||
|
||||
- name: Build sherpa-onnx for windows
|
||||
shell: bash
|
||||
run: |
|
||||
cd build
|
||||
cmake --build . --config Release -- -m:2
|
||||
cmake --build . --config Release --target install -- -m:2
|
||||
cmake --build . --config Release
|
||||
cmake --build . --config Release --target install
|
||||
|
||||
ls -lh ./bin/Release/sherpa-onnx.exe
|
||||
|
||||
|
||||
Reference in New Issue
Block a user