Commit ab157e45 authored by Sergei Golubchik's avatar Sergei Golubchik

MDEV-5152 mysql_config includes -lprobes_mysql but mo such library installed

when converting /a/full/path/to/a/file.ext to -lfile ignore all files
with non-library extenstions.
parent f5823b79
......@@ -270,10 +270,12 @@ MACRO(EXTRACT_LINK_LIBRARIES target var)
IF (lib MATCHES "^\\-l")
SET(${var} "${${var}} ${lib} ")
ELSEIF(lib MATCHES "^/")
# Full path, convert to just filename, strip "lib" prefix and extension
GET_FILENAME_COMPONENT(lib "${lib}" NAME_WE)
STRING(REGEX REPLACE "^lib" "" lib "${lib}")
SET(${var} "${${var}}-l${lib} " )
IF (lib MATCHES "\\.(a|so([0-9.]*)|lib|dll|dylib)$")
# Full path, convert to just filename, strip "lib" prefix and extension
GET_FILENAME_COMPONENT(lib "${lib}" NAME_WE)
STRING(REGEX REPLACE "^lib" "" lib "${lib}")
SET(${var} "${${var}}-l${lib} " )
ENDIF()
ELSE()
SET(${var} "${${var}}-l${lib} " )
ENDIF()
......
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