| | |
| | | |
| | | option(ENABLE_WEBSOCKET "Whether to build websocket server" ON) |
| | | option(ENABLE_PORTAUDIO "Whether to build portaudio" ON) |
| | | option(ENABLE_GLOG "Whether to build glog" ON) |
| | | option(ENABLE_FST "Whether to build openfst" ON) # ITN need openfst compiled |
| | | option(BUILD_SHARED_LIBS "Build shared libraries" ON) |
| | | option(GPU "Whether to build with GPU" OFF) |
| | | |
| | | if(WIN32) |
| | | file(REMOVE ${PROJECT_SOURCE_DIR}/../onnxruntime/third_party/glog/src/config.h |
| | |
| | | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread -fPIC") |
| | | endif() |
| | | |
| | | |
| | | |
| | | |
| | | option(ENABLE_GLOG "Whether to build glog" ON) |
| | | option(ENABLE_FST "Whether to build openfst" ON) # ITN need openfst compiled |
| | | option(BUILD_SHARED_LIBS "Build shared libraries" ON) |
| | | if(GPU) |
| | | add_definitions(-DUSE_GPU) |
| | | set(TORCH_DIR "/usr/local/lib/python3.8/dist-packages/torch") |
| | | set(TORCH_BLADE_DIR "/usr/local/lib/python3.8/dist-packages/torch_blade") |
| | | include_directories(${TORCH_DIR}/include) |
| | | include_directories(${TORCH_DIR}/include/torch/csrc/api/include) |
| | | link_directories(${TORCH_DIR}/lib) |
| | | link_directories(${TORCH_BLADE_DIR}) |
| | | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -D_GLIBCXX_USE_CXX11_ABI=0") |
| | | endif() |
| | | |
| | | if(ENABLE_WEBSOCKET) |
| | | # cmake_policy(SET CMP0135 NEW) |