Skip to content

Commit 516d8e2

Browse files
committed
fix: support macOS compile
Signed-off-by: weedge <[email protected]>
1 parent d213140 commit 516d8e2

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,13 @@ FILE(GLOB_RECURSE SRCS
66
)
77
add_library(${TARGET} SHARED ${SRCS} ${USRC})
88

9+
if (APPLE)
10+
message(STATUS "apple...")
11+
set(CMAKE_C_COMPILER /usr/bin/clang)
12+
target_link_libraries(${TARGET} -L/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib)
13+
target_link_libraries(${TARGET} -lsystem)
14+
endif()
15+
16+
917
set_target_properties(${TARGET} PROPERTIES SUFFIX ".so")
1018
set_target_properties(${TARGET} PROPERTIES PREFIX "")

0 commit comments

Comments
 (0)