summaryrefslogtreecommitdiff
path: root/scripts/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/CMakeLists.txt')
-rw-r--r--scripts/CMakeLists.txt10
1 files changed, 6 insertions, 4 deletions
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()