diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index f6c6c3b..73bdd55 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -6,5 +6,14 @@ FILE(GLOB_RECURSE SRCS ) add_library(${TARGET} SHARED ${SRCS} ${USRC}) +# OS X 11.x doesn't have /usr/lib/libSystem.dylib and needs an explicit setting. +if ( APPLE AND NOT EXISTS /usr/lib/libSystem.dylib) + 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 "") \ No newline at end of file