From: Hannes Magnusson Date: Wed, 7 Jun 2017 19:43:40 +0000 (-0700) Subject: cmake: remove spurious "-l" from linker flags X-Git-Tag: curl-7_55_0~93 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=75c3596f75ba1d2fd2d7cc2dccf0065250cd6a7c;p=curl cmake: remove spurious "-l" from linker flags Fixes #1552 --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 5d8b9f10f..086c37197 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1275,7 +1275,7 @@ set(LDFLAGS "${CMAKE_SHARED_LINKER_FLAGS}") set(LIBCURL_LIBS "") set(libdir "${CMAKE_INSTALL_PREFIX}/lib") foreach(_lib ${CMAKE_C_IMPLICIT_LINK_LIBRARIES} ${CURL_LIBS}) - if(_lib MATCHES ".*/.*") + if(_lib MATCHES ".*/.*" OR _lib MATCHES "^-") set(LIBCURL_LIBS "${LIBCURL_LIBS} ${_lib}") else() set(LIBCURL_LIBS "${LIBCURL_LIBS} -l${_lib}")