link against libz on non Apple/Windows

Needed by libcrypto at least
This commit is contained in:
moneromooo-monero 2023-03-21 09:40:55 +00:00 committed by wowario
parent 3341cded57
commit eb2a7342b8
No known key found for this signature in database
GPG Key ID: 24DCBE762DE9C111

View File

@ -1117,7 +1117,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})