diff --git a/CMakeLists.txt b/CMakeLists.txt index 8c088f26d..0fe496c9f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1113,7 +1113,8 @@ elseif(CMAKE_SYSTEM_NAME MATCHES "(SunOS|Solaris)") set(EXTRA_LIBRARIES socket nsl resolv) elseif(NOT MSVC AND NOT DEPENDS) find_library(RT rt) - set(EXTRA_LIBRARIES ${RT}) + find_library(Z z) + set(EXTRA_LIBRARIES ${RT} ${Z}) endif() list(APPEND EXTRA_LIBRARIES ${CMAKE_DL_LIBS})