aboutsummaryrefslogtreecommitdiffstats
path: root/cmake/Modules
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2014-11-03 14:20:01 +0100
committerPierre Ossman <ossman@cendio.se>2014-11-03 14:20:01 +0100
commit40a5f9ef651dd528b180e527bd1762e63c00bc50 (patch)
tree2e9ee399bc4d3b0865428deb260884957d6cad6a /cmake/Modules
parent216d591f41c034b9af60f02b9e355fa12d5a5f83 (diff)
downloadtigervnc-40a5f9ef651dd528b180e527bd1762e63c00bc50.tar.gz
tigervnc-40a5f9ef651dd528b180e527bd1762e63c00bc50.zip
Handle arguments that have the -l prefix
Diffstat (limited to 'cmake/Modules')
-rw-r--r--cmake/Modules/CMakeMacroLibtoolFile.cmake6
1 files changed, 6 insertions, 0 deletions
diff --git a/cmake/Modules/CMakeMacroLibtoolFile.cmake b/cmake/Modules/CMakeMacroLibtoolFile.cmake
index eb2e9bae..eb907489 100644
--- a/cmake/Modules/CMakeMacroLibtoolFile.cmake
+++ b/cmake/Modules/CMakeMacroLibtoolFile.cmake
@@ -46,6 +46,12 @@ macro(libtool_create_control_file _target)
if(NOT _ltp AND NOT ${library} STREQUAL "general")
# Not a CMake target, so use find_library() to attempt to locate the
# library in a system directory.
+
+ # Need to remove -l prefix
+ if (${library} MATCHES "^\\${CMAKE_LINK_LIBRARY_FLAG}")
+ string(REPLACE ${CMAKE_LINK_LIBRARY_FLAG} "" library ${library})
+ endif()
+
find_library(FL ${library})
if(FL)
# Found library, so extract the path and library name, then add the