Skip to content

Commit

Permalink
Supports cmake compilation compatible with v3.13.
Browse files Browse the repository at this point in the history
  • Loading branch information
chenyu committed Sep 25, 2023
1 parent fef6108 commit 67b8892
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ endif()
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Modules)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)

if(NOT BUILD_SHARED_LIBS AND LINUX AND NOT APPLE)
if(NOT BUILD_SHARED_LIBS AND CMAKE_SYSTEM_NAME STREQUAL Linux)
if(SHERPA_ONNX_LINK_LIBSTDCPP_STATICALLY)
message(STATUS "Link libstdc++ statically")
set(CMAKE_CXX_FLAGS " ${CMAKE_CXX_FLAGS} -static-libstdc++ -static-libgcc ")
Expand Down
2 changes: 1 addition & 1 deletion sherpa-onnx/csrc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ if(SHERPA_ONNX_ENABLE_CHECK)
endif()
endif()

if(NOT BUILD_SHARED_LIBS AND LINUX AND NOT APPLE)
if(NOT BUILD_SHARED_LIBS AND CMAKE_SYSTEM_NAME STREQUAL Linux)
target_link_libraries(sherpa-onnx-core -pthread -ldl)
endif()

Expand Down

0 comments on commit 67b8892

Please sign in to comment.