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:
8
.github/workflows/macos.yaml
vendored
8
.github/workflows/macos.yaml
vendored
@@ -84,7 +84,13 @@ jobs:
|
||||
BUILD_SHARED_LIBS=ON
|
||||
fi
|
||||
|
||||
cmake -DSHERPA_ONNX_ENABLE_TTS=${{ matrix.with_tts }} -D BUILD_SHARED_LIBS=$BUILD_SHARED_LIBS -D CMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_OSX_ARCHITECTURES='arm64;x86_64' -DCMAKE_INSTALL_PREFIX=./install ..
|
||||
cmake \
|
||||
-DSHERPA_ONNX_ENABLE_TTS=${{ matrix.with_tts }} \
|
||||
-D BUILD_SHARED_LIBS=$BUILD_SHARED_LIBS \
|
||||
-D CMAKE_BUILD_TYPE=${{ matrix.build_type }} \
|
||||
-D CMAKE_OSX_ARCHITECTURES='arm64;x86_64' \
|
||||
-D CMAKE_INSTALL_PREFIX=./install \
|
||||
..
|
||||
|
||||
- name: Build sherpa-onnx for macos
|
||||
shell: bash
|
||||
|
||||
Reference in New Issue
Block a user