forked from wenet-e2e/wenet
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
39 lines (36 loc) · 952 Bytes
/
CMakeLists.txt
File metadata and controls
39 lines (36 loc) · 952 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
set(decoder_srcs
asr_decoder.cc
asr_model.cc
context_graph.cc
ctc_prefix_beam_search.cc
ctc_wfst_beam_search.cc
ctc_endpoint.cc
)
if(NOT TORCH AND NOT ONNX AND NOT XPU AND NOT IOS)
message(FATAL_ERROR "Please build with TORCH or ONNX or XPU or IOS!!!")
endif()
if(TORCH)
list(APPEND decoder_srcs torch_asr_model.cc)
endif()
if(ONNX)
list(APPEND decoder_srcs onnx_asr_model.cc)
endif()
if(IOS)
list(APPEND decoder_srcs ios_asr_model.cc)
endif()
add_library(decoder STATIC ${decoder_srcs})
target_link_libraries(decoder PUBLIC kaldi-decoder frontend
post_processor utils)
if(ANDROID)
target_link_libraries(decoder PUBLIC ${PYTORCH_LIBRARY} ${FBJNI_LIBRARY})
else()
if(TORCH)
target_link_libraries(decoder PUBLIC ${TORCH_LIBRARIES})
endif()
if(ONNX)
target_link_libraries(decoder PUBLIC onnxruntime)
endif()
if(XPU)
target_link_libraries(decoder PUBLIC xpu_conformer)
endif()
endif()