Skip to content

Commit

Permalink
Fix pkg-config for macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
csukuangfj committed Nov 1, 2023
1 parent 3030fb5 commit 9859dc6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ message(STATUS "CMAKE_CXX_FLAGS: ${CMAKE_CXX_FLAGS}")

if(NOT BUILD_SHARED_LIBS)
if(APPLE)
set(SHERPA_ONNX_PKG_CONFIG_EXTRA_LIBS "-lc++")
set(SHERPA_ONNX_PKG_CONFIG_EXTRA_LIBS "-lc++ -framework Foundation")
endif()

if(UNIX AND NOT APPLE)
Expand Down
2 changes: 2 additions & 0 deletions c-api-examples/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ CFLAGS := -I ../ -I ../build/_deps/cargs-src/include/
LDFLAGS := -L ../build/lib
LDFLAGS += -L ../build/_deps/onnxruntime-src/lib
LDFLAGS += -lsherpa-onnx-c-api -lsherpa-onnx-core -lonnxruntime -lkaldi-native-fbank-core -lkaldi-decoder-core -lsherpa-onnx-kaldifst-core -lsherpa-onnx-fst -lcargs
LDFLAGS += -framework Foundation
LDFLAGS += -lc++
LDFLAGS += -Wl,-rpath,${CUR_DIR}/../build/lib
LDFLAGS += -Wl,-rpath,${CUR_DIR}/../build/_deps/onnxruntime-src/lib

Expand Down

0 comments on commit 9859dc6

Please sign in to comment.