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