Skip to content

Commit

Permalink
fix building
Browse files Browse the repository at this point in the history
  • Loading branch information
csukuangfj committed Aug 2, 2023
1 parent 294b3d0 commit fd5dbee
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,14 @@ endif()

set(SHERPA_NCNN_PKG_CONFIG_EXTRA_LIBS)

if(APPLE AND NOT BUILD_SHARED_LIBS)
set(SHERPA_NCNN_PKG_CONFIG_EXTRA_LIBS "-lomp -lc++")
if(NOT BUILD_SHARED_LIBS)
if(APPLE)
set(SHERPA_NCNN_PKG_CONFIG_EXTRA_LIBS "-lomp -lc++")
endif()

if(UNIX AND NOT APPLE)
set(SHERPA_NCNN_PKG_CONFIG_EXTRA_LIBS "-lm -lstdc++ -fopenmp")
endif()
endif()

# See https://people.freedesktop.org/~dbn/pkg-config-guide.html
Expand Down

0 comments on commit fd5dbee

Please sign in to comment.