Browse Source

2024.5.10-去除ITN的依赖构建

master
Administrator 1 year ago
parent
commit
bcf82f5190
1 changed files with 12 additions and 9 deletions
  1. +12
    -9
      cmake-linux/openfst.cmake

+ 12
- 9
cmake-linux/openfst.cmake

@ -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.
# gflagsglog/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)

Loading…
Cancel
Save