You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
1.6 KiB
32 lines
1.6 KiB
2 years ago
|
set(openfst_PREFIX_DIR ${fc_patch}/openfst)
|
||
3 years ago
|
set(openfst_SOURCE_DIR ${fc_patch}/openfst-src)
|
||
|
set(openfst_BINARY_DIR ${fc_patch}/openfst-build)
|
||
|
|
||
2 years ago
|
include(FetchContent)
|
||
2 years ago
|
# openfst Acknowledgments:
|
||
|
#Cyril Allauzen, Michael Riley, Johan Schalkwyk, Wojciech Skut and Mehryar Mohri,
|
||
|
#"OpenFst: A General and Efficient Weighted Finite-State Transducer Library",
|
||
|
#Proceedings of the Ninth International Conference on Implementation and
|
||
|
#Application of Automata, (CIAA 2007), volume 4783 of Lecture Notes in
|
||
|
#Computer Science, pages 11-23. Springer, 2007. http://www.openfst.org.
|
||
|
|
||
3 years ago
|
ExternalProject_Add(openfst
|
||
2 years ago
|
URL https://paddleaudio.bj.bcebos.com/build/openfst_1.7.2.zip
|
||
3 years ago
|
URL_HASH SHA256=ffc56931025579a8af3515741c0f3b0fc3a854c023421472c07ca0c6389c75e6
|
||
2 years ago
|
PREFIX ${openfst_PREFIX_DIR}
|
||
|
SOURCE_DIR ${openfst_SOURCE_DIR}
|
||
|
BINARY_DIR ${openfst_BINARY_DIR}
|
||
3 years ago
|
CONFIGURE_COMMAND ${openfst_SOURCE_DIR}/configure --prefix=${openfst_PREFIX_DIR}
|
||
|
"CPPFLAGS=-I${gflags_BINARY_DIR}/include -I${glog_SOURCE_DIR}/src -I${glog_BINARY_DIR}"
|
||
|
"LDFLAGS=-L${gflags_BINARY_DIR} -L${glog_BINARY_DIR}"
|
||
|
"LIBS=-lgflags_nothreads -lglog -lpthread"
|
||
2 years ago
|
COMMAND ${CMAKE_COMMAND} -E copy_directory ${PROJECT_SOURCE_DIR}/patch/openfst ${openfst_SOURCE_DIR}
|
||
3 years ago
|
BUILD_COMMAND make -j 4
|
||
|
)
|
||
|
link_directories(${openfst_PREFIX_DIR}/lib)
|
||
2 years ago
|
include_directories(${openfst_PREFIX_DIR}/include)
|
||
2 years ago
|
|
||
|
|
||
2 years ago
|
message(STATUS "OpenFST inc dir: ${openfst_PREFIX_DIR}/include")
|
||
2 years ago
|
message(STATUS "OpenFST lib dir: ${openfst_PREFIX_DIR}/lib")
|