summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
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()