Support pkg-config (#253)

This commit is contained in:
Fangjun Kuang
2023-08-10 11:22:36 +08:00
committed by GitHub
parent a04221a1ce
commit 865fd1e017
7 changed files with 167 additions and 5 deletions

View File

@@ -57,6 +57,9 @@ function(download_portaudio)
if(BUILD_SHARED_LIBS)
set_target_properties(portaudio PROPERTIES OUTPUT_NAME "sherpa-onnx-portaudio")
if(NOT WIN32)
target_compile_options(portaudio PRIVATE "-Wno-deprecated-declarations")
endif()
if(SHERPA_ONNX_ENABLE_PYTHON AND WIN32)
install(TARGETS portaudio DESTINATION ..)
@@ -65,6 +68,9 @@ function(download_portaudio)
endif()
else()
set_target_properties(portaudio_static PROPERTIES OUTPUT_NAME "sherpa-onnx-portaudio_static")
if(NOT WIN32)
target_compile_options(portaudio_static PRIVATE "-Wno-deprecated-declarations")
endif()
if(SHERPA_ONNX_ENABLE_PYTHON AND WIN32)
install(TARGETS portaudio_static DESTINATION ..)
else()