parent
36d16fffcd
commit
3887a9b2a5
@ -0,0 +1,27 @@
|
||||
include(FetchContent)
|
||||
set(Boost_DEBUG ON)
|
||||
|
||||
set(Boost_PREFIX_DIR ${fc_patch}/boost)
|
||||
set(Boost_SOURCE_DIR ${fc_patch}/boost-src)
|
||||
|
||||
FetchContent_Declare(
|
||||
Boost
|
||||
URL https://boostorg.jfrog.io/artifactory/main/release/1.75.0/source/boost_1_75_0.tar.gz
|
||||
URL_HASH SHA256=aeb26f80e80945e82ee93e5939baebdca47b9dee80a07d3144be1e1a6a66dd6a
|
||||
PREFIX ${Boost_PREFIX_DIR}
|
||||
SOURCE_DIR ${Boost_SOURCE_DIR}
|
||||
)
|
||||
|
||||
execute_process(COMMAND bootstrap.sh WORKING_DIRECTORY ${Boost_SOURCE_DIR})
|
||||
execute_process(COMMAND b2 WORKING_DIRECTORY ${Boost_SOURCE_DIR})
|
||||
|
||||
FetchContent_MakeAvailable(Boost)
|
||||
|
||||
message(STATUS "boost src dir: ${Boost_SOURCE_DIR}")
|
||||
message(STATUS "boost inc dir: ${Boost_INCLUDE_DIR}")
|
||||
message(STATUS "boost bin dir: ${Boost_BINARY_DIR}")
|
||||
|
||||
set(BOOST_ROOT ${Boost_SOURCE_DIR})
|
||||
message(STATUS "boost root dir: ${BOOST_ROOT}")
|
||||
|
||||
include_directories(${Boost_SOURCE_DIR})
|
@ -1,10 +1,8 @@
|
||||
include(FetchContent)
|
||||
|
||||
FetchContent_Declare(
|
||||
glog
|
||||
URL https://github.com/google/glog/archive/v0.4.0.zip
|
||||
URL_HASH SHA256=9e1b54eb2782f53cd8af107ecf08d2ab64b8d0dc2b7f5594472f3bd63ca85cdc
|
||||
)
|
||||
FetchContent_MakeAvailable(glog)
|
||||
|
||||
include_directories(${glog_BINARY_DIR} ${glog_SOURCE_DIR}/src)
|
||||
|
@ -1,14 +1,10 @@
|
||||
include(FetchContent)
|
||||
|
||||
FetchContent_Declare(
|
||||
kenlm
|
||||
GIT_REPOSITORY "https://github.com/kpu/kenlm.git"
|
||||
GIT_TAG "df2d717e95183f79a90b2fa6e4307083a351ca6a"
|
||||
)
|
||||
|
||||
# https://github.com/kpu/kenlm/blob/master/cmake/modules/FindEigen3.cmake
|
||||
set(EIGEN3_INCLUDE_DIR ${Eigen3_SOURCE_DIR})
|
||||
|
||||
FetchContent_MakeAvailable(kenlm)
|
||||
|
||||
include_directories(${kenlm_SOURCE_DIR})
|
@ -0,0 +1,19 @@
|
||||
include(FetchContent)
|
||||
set(openfst_SOURCE_DIR ${fc_patch}/openfst-src)
|
||||
set(openfst_BINARY_DIR ${fc_patch}/openfst-build)
|
||||
|
||||
ExternalProject_Add(openfst
|
||||
URL https://github.com/mjansche/openfst/archive/refs/tags/1.7.2.zip
|
||||
URL_HASH SHA256=ffc56931025579a8af3515741c0f3b0fc3a854c023421472c07ca0c6389c75e6
|
||||
# #PREFIX ${openfst_PREFIX_DIR}
|
||||
# SOURCE_DIR ${openfst_SOURCE_DIR}
|
||||
# BINARY_DIR ${openfst_BINARY_DIR}
|
||||
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"
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/patch/openfst ${openfst_SOURCE_DIR}
|
||||
BUILD_COMMAND make -j 4
|
||||
)
|
||||
link_directories(${openfst_PREFIX_DIR}/lib)
|
||||
include_directories(${openfst_PREFIX_DIR}/include)
|
Loading…
Reference in new issue