-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
46 lines (36 loc) · 1.26 KB
/
CMakeLists.txt
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
40
41
42
43
44
45
46
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
project(ctcdecoder)
set(CMAKE_VERBOSE_MAKEFILE on)
set(CMAKE_CXX_STANDARD 14)
include(FetchContent)
include(ExternalProject)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_EXTENSIONS OFF)
set(FETCHCONTENT_QUIET off)
get_filename_component(fc_base "fc_base" REALPATH BASE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
set(WENET_CMAKE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/src/wenet/runtime/core/cmake")
list(APPEND CMAKE_MODULE_PATH "${WENET_CMAKE_PATH}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -pthread -fPIC")
include(openfst)
include(glog)
add_subdirectory(src/pybind11)
include_directories(
src/wenet/runtime/core
)
add_library(ctc_prefix_beam_search STATIC
src/wenet/runtime/core/decoder/ctc_prefix_beam_search.cc
src/wenet/runtime/core/decoder/context_graph.cc
src/wenet/runtime/core/utils/utils.cc
src/wenet/runtime/core/utils/thread_pool.h
src/wenet/runtime/core/utils/string.cc
)
target_link_libraries(ctc_prefix_beam_search PUBLIC fst)
include_directories(src)
add_library(ctc_decoder STATIC
src/ctc_decoder.cc
src/edit_distance.cc
)
target_link_libraries(ctc_decoder ctc_prefix_beam_search)
# ctc decoder
pybind11_add_module(_ctcdecoder py/cpp/binding.cc)
target_link_libraries(_ctcdecoder PRIVATE ctc_decoder)