From ab157e4556ef2c46de6d4a1f29a024ae58e4d4aa Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Tue, 8 Apr 2014 16:27:40 +0200 Subject: 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. --- scripts/CMakeLists.txt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'scripts') diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt index 421dab20d12..ff4c098295a 100644 --- a/scripts/CMakeLists.txt +++ b/scripts/CMakeLists.txt @@ -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() -- cgit v1.2.1