Commit b0827168 authored by Robert Bindar's avatar Robert Bindar

MDEV-21206 Can't link zlib library during DBD::mysql installation

mysql_config should never return -lzlib as linking flag.
Clients trying to link against mariadb that use the output of
mysql_config experience linking error because we return -lzlib
when we don't ship any libzlib.a in our binary tarballs, bundled
zlib static library is already linked.
parent fb0b2893
......@@ -24,7 +24,7 @@ MACRO(EXTRACT_LINK_LIBRARIES target var)
FOREACH(lib ${${target}_LIB_DEPENDS})
# Filter out "general", it is not a library, just CMake hint
# Also, remove duplicates
IF(NOT lib STREQUAL "general" AND NOT ${var} MATCHES "-l${lib} ")
IF(NOT lib STREQUAL "general" AND NOT ${var} MATCHES "-l${lib} " AND NOT lib STREQUAL "zlib")
IF (lib MATCHES "^\\-")
SET(${var} "${${var}} ${lib} ")
ELSEIF(lib MATCHES "^/")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment