# We can't build glog with gflags, unless gflags is pre-installed. # If build glog with pre-installed gflags, there will be conflict. #message(STATUS "${BoldGreen}glog: ${glog_SOURCE_DIR}${ColourReset}") set(openfst_BUILD "${LIB_BASE_DIR}/openfst-build") if(NOT EXISTS ${openfst_BUILD}) # install openfst #./configure --prefix=${openfst_SOURCE_DIR}/build --enable-static --disable-shared --with-pic execute_process( COMMAND ./configure --prefix=${openfst_BUILD} WORKING_DIRECTORY ${LIB_BASE_DIR}/openfst-src) execute_process( COMMAND cmake --build . --target install WORKING_DIRECTORY ${openfst_BUILD}) execute_process( 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. find_package(gflags) set(WITH_GFLAGS OFF CACHE BOOL "whether build glog with gflags" FORCE) find_package(glog) if(NOT GRAPH_TOOLS) set(HAVE_BIN OFF CACHE BOOL "Build the fst binaries" FORCE) set(HAVE_SCRIPT OFF CACHE BOOL "Build the fstscript" FORCE) endif() set(HAVE_COMPACT OFF CACHE BOOL "Build compact" FORCE) set(HAVE_CONST OFF CACHE BOOL "Build const" FORCE) set(HAVE_GRM OFF CACHE BOOL "Build grm" FORCE) set(HAVE_FAR OFF CACHE BOOL "Build far" FORCE) set(HAVE_PDT OFF CACHE BOOL "Build pdt" FORCE) set(HAVE_MPDT OFF CACHE BOOL "Build mpdt" FORCE) set(HAVE_LINEAR OFF CACHE BOOL "Build linear" FORCE) set(HAVE_LOOKAHEAD OFF CACHE BOOL "Build lookahead" FORCE) set(HAVE_NGRAM OFF CACHE BOOL "Build ngram" FORCE) set(HAVE_SPECIAL OFF CACHE BOOL "Build special" FORCE) FetchContent_Declare(openfst SOURCE_DIR ${LIB_BASE_DIR}/openfst-src) # FetchContent_MakeAvailable(openfst) include_directories(${openfst_SOURCE_DIR}/src/include) set(openfst_BINARY_DIR "${grpc_build_dir}/src/lib") add_dependencies(fst glog::glog gflags) list(APPEND third_party_libraries fst glog::glog gflags) #list(APPEND third_party_libraries ) #