CMakeLists.txt 1.5 KB

123456789101112131415161718192021222324252627
  1. if(WIN32)
  2. include_directories(${ONNXRUNTIME_DIR}/include)
  3. include_directories(${FFMPEG_DIR}/include)
  4. include_directories(${OPENSSL_ROOT_DIR}//include)
  5. link_directories(${OPENSSL_ROOT_DIR}/lib)
  6. add_definitions(-D_WEBSOCKETPP_CPP11_RANDOM_DEVICE_)
  7. add_definitions(-D_WEBSOCKETPP_CPP11_TYPE_TRAITS_)
  8. add_compile_options("$<$<CXX_COMPILER_ID:MSVC>:/bigobj>")
  9. add_compile_options("$<$<CXX_COMPILER_ID:MSVC>:/utf-8>")
  10. SET(RELATION_SOURCE "../../onnxruntime/src/audio.cpp" "../../onnxruntime/src/resample.cpp" "../../onnxruntime/src/util.cpp" "../../onnxruntime/src/alignedmem.cpp" "../../onnxruntime/src/encode_converter.cpp")
  11. endif()
  12. add_executable(funasr-wss-server "funasr-wss-server.cpp" "websocket-server.cpp" ${RELATION_SOURCE})
  13. add_executable(funasr-wss-server-2pass "funasr-wss-server-2pass.cpp" "websocket-server-2pass.cpp" ${RELATION_SOURCE})
  14. add_executable(funasr-wss-client "funasr-wss-client.cpp" ${RELATION_SOURCE})
  15. add_executable(funasr-wss-client-2pass "funasr-wss-client-2pass.cpp" "microphone.cpp" ${RELATION_SOURCE})
  16. target_link_libraries(funasr-wss-client PUBLIC funasr ${OPENSSL_CRYPTO_LIBRARY} ${OPENSSL_SSL_LIBRARY})
  17. target_link_libraries(funasr-wss-client-2pass PUBLIC funasr ${OPENSSL_CRYPTO_LIBRARY} ${OPENSSL_SSL_LIBRARY} portaudio)
  18. target_link_libraries(funasr-wss-server PUBLIC funasr ${OPENSSL_CRYPTO_LIBRARY} ${OPENSSL_SSL_LIBRARY})
  19. target_link_libraries(funasr-wss-server-2pass PUBLIC funasr ${OPENSSL_CRYPTO_LIBRARY} ${OPENSSL_SSL_LIBRARY})