Install binaries via pip install (#112)
When pepole use pip install sherpa-onnx, they also get the following binaries: (py38) fangjuns-MacBook-Pro:bin fangjun$ ls -lh sherpa-onnx* -rwxr-xr-x 1 fangjun staff 36K Apr 4 13:48 sherpa-onnx -rwxr-xr-x 1 fangjun staff 52K Apr 4 13:48 sherpa-onnx-microphone -rwxr-xr-x 1 fangjun staff 54K Apr 4 13:48 sherpa-onnx-microphone-offline -rwxr-xr-x 1 fangjun staff 37K Apr 4 13:48 sherpa-onnx-offline -rwxr-xr-x 1 fangjun staff 634K Apr 4 13:48 sherpa-onnx-offline-websocket-server -rwxr-xr-x 1 fangjun staff 710K Apr 4 13:48 sherpa-onnx-online-websocket-client -rwxr-xr-x 1 fangjun staff 651K Apr 4 13:48 sherpa-onnx-online-websocket-server (py38) fangjuns-MacBook-Pro:bin fangjun$ pwd /Users/fangjun/py38/bin
This commit is contained in:
@@ -53,6 +53,23 @@ function(download_portaudio)
|
||||
endif()
|
||||
|
||||
add_subdirectory(${portaudio_SOURCE_DIR} ${portaudio_BINARY_DIR} EXCLUDE_FROM_ALL)
|
||||
|
||||
if(BUILD_SHARED_LIBS)
|
||||
set_target_properties(portaudio PROPERTIES OUTPUT_NAME "sherpa-onnx-portaudio")
|
||||
|
||||
if(SHERPA_ONNX_ENABLE_PYTHON AND WIN32)
|
||||
install(TARGETS portaudio DESTINATION ..)
|
||||
else()
|
||||
install(TARGETS portaudio DESTINATION lib)
|
||||
endif()
|
||||
else()
|
||||
set_target_properties(portaudio_static PROPERTIES OUTPUT_NAME "sherpa-onnx-portaudio_static")
|
||||
if(SHERPA_ONNX_ENABLE_PYTHON AND WIN32)
|
||||
install(TARGETS portaudio_static DESTINATION ..)
|
||||
else()
|
||||
install(TARGETS portaudio_static DESTINATION lib)
|
||||
endif()
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
download_portaudio()
|
||||
|
||||
Reference in New Issue
Block a user