summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2017-07-03 13:47:23 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-07-03 13:47:23 -0700
commit60123515b64c5c8262401cf55120e7ac9399fa9d (patch)
treea483d217fd6c4112236d4e10a2fec24a78ca39a1 /cmake
parent7a6cc12da28b055abbce6fc34a51c08fba200cb8 (diff)
downloadsubsurface-60123515b64c5c8262401cf55120e7ac9399fa9d.tar.gz
Fix '-L-lcurl' linker warning
This would happen if we don't have a specific directory in LIBSSH2_LIBRARY_DIRS. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/Modules/HandleFindGit2.cmake6
1 files changed, 5 insertions, 1 deletions
diff --git a/cmake/Modules/HandleFindGit2.cmake b/cmake/Modules/HandleFindGit2.cmake
index 9d682117d..63cd4047c 100644
--- a/cmake/Modules/HandleFindGit2.cmake
+++ b/cmake/Modules/HandleFindGit2.cmake
@@ -31,5 +31,9 @@ else()
if(!LIBCURL_FOUND OR "${LIBCURL_FOUND}" STREQUAL "")
pkg_config_library(LIBCURL libcurl REQUIRED)
endif()
- set(LIBGIT2_LIBRARIES ${LIBGIT2_LIBRARIES} -L${LIBSSH2_LIBRARY_DIRS} ${LIBSSH2_LIBRARIES} ${LIBCURL_LIBRARIES} -lcrypto)
+ if("${LIBSSH2_LIBRARY_DIRS}" STREQUAL "")
+ set(LIBGIT2_LIBRARIES ${LIBGIT2_LIBRARIES} ${LIBSSH2_LIBRARIES} ${LIBCURL_LIBRARIES} -lcrypto)
+ else()
+ set(LIBGIT2_LIBRARIES ${LIBGIT2_LIBRARIES} -L${LIBSSH2_LIBRARY_DIRS} ${LIBSSH2_LIBRARIES} ${LIBCURL_LIBRARIES} -lcrypto)
+ endif()
endif()