]> source.dussan.org Git - tigervnc.git/commitdiff
Handle arguments that have the -l prefix
authorPierre Ossman <ossman@cendio.se>
Mon, 3 Nov 2014 13:20:01 +0000 (14:20 +0100)
committerPierre Ossman <ossman@cendio.se>
Mon, 3 Nov 2014 13:20:01 +0000 (14:20 +0100)
cmake/Modules/CMakeMacroLibtoolFile.cmake

index eb2e9bae01ed0c65d496663a388fecae620e6861..eb907489df1f82d3ed763f037490bc31431b6d7d 100644 (file)
@@ -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