From 60123515b64c5c8262401cf55120e7ac9399fa9d Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Mon, 3 Jul 2017 13:47:23 -0700 Subject: 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 --- cmake/Modules/HandleFindGit2.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'cmake/Modules/HandleFindGit2.cmake') 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() -- cgit v1.2.3-70-g09d2