Skip to content

Commit

Permalink
fix: support macOS compile
Browse files Browse the repository at this point in the history
Signed-off-by: weedge <weege007@gmail.com>
  • Loading branch information
weedge committed Aug 7, 2023
1 parent d213140 commit 516d8e2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,13 @@ FILE(GLOB_RECURSE SRCS
)
add_library(${TARGET} SHARED ${SRCS} ${USRC})

if (APPLE)
message(STATUS "apple...")
set(CMAKE_C_COMPILER /usr/bin/clang)
target_link_libraries(${TARGET} -L/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib)
target_link_libraries(${TARGET} -lsystem)
endif()


set_target_properties(${TARGET} PROPERTIES SUFFIX ".so")
set_target_properties(${TARGET} PROPERTIES PREFIX "")

0 comments on commit 516d8e2

Please sign in to comment.