|
|
@ -3,6 +3,16 @@ |
|
|
|
|
|
|
|
set(openfst_ROOT ${LIB_BASE_DIR}/openfst-src) |
|
|
|
set(openfst_BUILD "${LIB_BASE_DIR}/openfst-build") |
|
|
|
# We can't build glog with gflags, unless gflags is pre-installed. |
|
|
|
# If build glog with pre-installed gflags, there will be conflict. |
|
|
|
include(gflags) |
|
|
|
if(TARGET gflags) |
|
|
|
message(STATUS "${BoldGreen}Find Package gflags: ${gflags_FOUND}${ColourReset}") |
|
|
|
set_target_properties(gflags PROPERTIES INTERFACE_COMPILE_OPTIONS "-fPIC") |
|
|
|
endif() |
|
|
|
set(WITH_GFLAGS OFF CACHE BOOL "whether build glog with gflags" FORCE) |
|
|
|
include(glog) |
|
|
|
|
|
|
|
if(REBUILD) |
|
|
|
message(STATUS "${BoldGreen}Install openfst: ${GLOG_BUILD_DIR}${ColourReset}") |
|
|
|
#./configure --prefix=${openfst_SOURCE_DIR}/build --enable-static --disable-shared --with-pic |
|
|
@ -22,16 +32,9 @@ if(REBUILD) |
|
|
|
COMMAND cmake --install . |
|
|
|
WORKING_DIRECTORY ${openfst_BUILD}) |
|
|
|
endif() |
|
|
|
# We can't build glog with gflags, unless gflags is pre-installed. |
|
|
|
# If build glog with pre-installed gflags, there will be conflict. |
|
|
|
|
|
|
|
# gflags和glog现在被我安装到了系统盘下/usr/lib/x86_64-linux-gnu |
|
|
|
include(gflags) |
|
|
|
if(TARGET gflags) |
|
|
|
message(STATUS "${BoldGreen}Find Package gflags: ${gflags_FOUND}${ColourReset}") |
|
|
|
set_target_properties(gflags PROPERTIES INTERFACE_COMPILE_OPTIONS "-fPIC") |
|
|
|
endif() |
|
|
|
set(WITH_GFLAGS OFF CACHE BOOL "whether build glog with gflags" FORCE) |
|
|
|
include(glog) |
|
|
|
|
|
|
|
# 下面这堆关键字是防止cmake出一堆无关的提示 |
|
|
|
if(NOT GRAPH_TOOLS) |
|
|
|
set(HAVE_BIN OFF CACHE BOOL "Build the fst binaries" FORCE) |
|
|
|