File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -67,6 +67,14 @@ if(NOT MSVC)
6767 else ()
6868 message ("${ZLIB} found" )
6969 endif ()
70+
71+ if (APPLE AND ZIG_STATIC)
72+ list (REMOVE_ITEM LLVM_LIBRARIES "-lz" )
73+ list (REMOVE_ITEM LLVM_LIBRARIES "-lxml2" )
74+ list (REMOVE_ITEM LLVM_LIBRARIES "-lcurses" )
75+ find_library (LIBNCURSES NAMES libncurses.a)
76+ list (APPEND LLVM_LIBRARIES "${LIBNCURSES} " "${LIBXML2} " "${ZLIB} " )
77+ endif ()
7078endif ()
7179
7280set (ZIG_CPP_LIB_DIR "${CMAKE_BINARY_DIR} /zig_cpp" )
@@ -815,7 +823,11 @@ if(MINGW)
815823elseif (MSVC )
816824 set (EXE_LDFLAGS "/STACK:16777216" )
817825elseif (ZIG_STATIC)
818- set (EXE_LDFLAGS "-static" )
826+ if (APPLE )
827+ set (EXE_LDFLAGS " " )
828+ else ()
829+ set (EXE_LDFLAGS "-static" )
830+ endif ()
819831else ()
820832 set (EXE_LDFLAGS " " )
821833endif ()
You can’t perform that action at this time.
0 commit comments