aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHannes Magnusson <bjori@php.net>2017-06-07 12:43:40 -0700
committerDaniel Stenberg <daniel@haxx.se>2017-07-06 12:21:20 +0200
commit75c3596f75ba1d2fd2d7cc2dccf0065250cd6a7c (patch)
tree77aa53bb6963ffe9b46ce45afb635ad601371881
parent23b828b78b1ea347e80039c9b3100ddcf5793cb0 (diff)
cmake: remove spurious "-l" from linker flags
Fixes #1552
-rw-r--r--CMakeLists.txt2
1 files changed, 1 insertions, 1 deletions
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}")